MCPcopy Create free account
hub / github.com/RocketMap/RocketMap / i8ln

Function i8ln

static/js/map.js:1200–1221  ·  view source on GitHub ↗
(word)

Source from the content-addressed store, hash-verified

1198}
1199
1200function i8ln (word) {
1201 if ($.isEmptyObject(i8lnDictionary) && language !== 'en' && languageLookups < languageLookupThreshold) {
1202 $.ajax({
1203 url: 'static/dist/locales/' + language + '.min.json',
1204 dataType: 'json',
1205 async: false,
1206 success: function (data) {
1207 i8lnDictionary = data
1208 },
1209 error: function (jqXHR, status, error) {
1210 console.log('Error loading i8ln dictionary: ' + error)
1211 languageLookups++
1212 }
1213 })
1214 }
1215 if (word in i8lnDictionary) {
1216 return i8lnDictionary[word]
1217 } else {
1218 // Word doesn't exist in dictionary return it as is
1219 return word
1220 }
1221}
1222
1223//
1224// Page Ready Exection

Callers 1

map.jsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected