@luftborn/custom-elements 2.12.3 → 2.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/demo/index.js +26 -84
- package/demo/index.min.js +25 -83
- package/demo/index.min.js.map +1 -1
- package/dist/framework/Language/Translator.d.ts +1 -20
- package/dist/framework/Language/Translator.js +24 -82
- package/dist/framework/Language/Translator.js.map +1 -1
- package/package.json +1 -1
- package/src/framework/Language/Translator.ts +25 -83
package/demo/index.min.js
CHANGED
|
@@ -7905,92 +7905,34 @@ var Translator = /** @class */ (function () {
|
|
|
7905
7905
|
}
|
|
7906
7906
|
Translator.Translate = function (key, language) {
|
|
7907
7907
|
if (language === void 0) { language = 'da'; }
|
|
7908
|
-
|
|
7909
|
-
var isSupportedLanguage = Translator.langauges.indexOf(language) != -1;
|
|
7908
|
+
var isSupportedLanguage = Object.keys(this.languaeDictionaries).includes(language);
|
|
7910
7909
|
if (!isSupportedLanguage) {
|
|
7911
7910
|
language = 'da';
|
|
7912
7911
|
}
|
|
7913
|
-
|
|
7914
|
-
|
|
7915
|
-
|
|
7916
|
-
|
|
7917
|
-
|
|
7918
|
-
|
|
7919
|
-
|
|
7920
|
-
|
|
7921
|
-
|
|
7922
|
-
|
|
7923
|
-
|
|
7924
|
-
|
|
7925
|
-
|
|
7926
|
-
|
|
7927
|
-
|
|
7928
|
-
|
|
7929
|
-
|
|
7930
|
-
|
|
7931
|
-
|
|
7932
|
-
|
|
7933
|
-
|
|
7934
|
-
|
|
7935
|
-
|
|
7936
|
-
|
|
7937
|
-
return this.italianDictionary.get(key);
|
|
7938
|
-
case 'lt':
|
|
7939
|
-
return this.latvianDictionary.get(key);
|
|
7940
|
-
case 'lv':
|
|
7941
|
-
return this.lituanianDictionary.get(key);
|
|
7942
|
-
case 'nl':
|
|
7943
|
-
return this.dutchDictionary.get(key);
|
|
7944
|
-
case 'no':
|
|
7945
|
-
return this.norwegianDictionary.get(key);
|
|
7946
|
-
case 'pl':
|
|
7947
|
-
return this.polishDictionary.get(key);
|
|
7948
|
-
case 'pt':
|
|
7949
|
-
return this.portugueseDictionary.get(key);
|
|
7950
|
-
case 'sv':
|
|
7951
|
-
return this.swedishDictionary.get(key);
|
|
7952
|
-
}
|
|
7953
|
-
};
|
|
7954
|
-
Translator.langauges = [
|
|
7955
|
-
'en',
|
|
7956
|
-
'da',
|
|
7957
|
-
'cs',
|
|
7958
|
-
'de',
|
|
7959
|
-
'el',
|
|
7960
|
-
'es',
|
|
7961
|
-
'et',
|
|
7962
|
-
'fi',
|
|
7963
|
-
'fr',
|
|
7964
|
-
'hu',
|
|
7965
|
-
'is',
|
|
7966
|
-
'it',
|
|
7967
|
-
'lt',
|
|
7968
|
-
'lv',
|
|
7969
|
-
'nl',
|
|
7970
|
-
'no',
|
|
7971
|
-
'pl',
|
|
7972
|
-
'pt',
|
|
7973
|
-
'sv',
|
|
7974
|
-
];
|
|
7975
|
-
Translator.danishDictionary = new DanishDictionary_1.default();
|
|
7976
|
-
Translator.englishDictionary = new EnglishDictionary_1.default();
|
|
7977
|
-
Translator.czechDictionary = new CzechDictionary_1.default();
|
|
7978
|
-
Translator.germanDictionary = new GermanDictionary_1.default();
|
|
7979
|
-
Translator.greekDictionary = new GreekDictionary_1.default();
|
|
7980
|
-
Translator.spanishDictionary = new SpanishDictionary_1.default();
|
|
7981
|
-
Translator.estonianDictionary = new EstonianDictionary_1.default();
|
|
7982
|
-
Translator.finnishDictionary = new FinnishDictionary_1.default();
|
|
7983
|
-
Translator.frenchDictionary = new FrenchDictionary_1.default();
|
|
7984
|
-
Translator.hungarianDictionary = new HungarianDictionary_1.default();
|
|
7985
|
-
Translator.icelandicDictionary = new IcelandicDictionary_1.default();
|
|
7986
|
-
Translator.italianDictionary = new ItalianDictionary_1.default();
|
|
7987
|
-
Translator.latvianDictionary = new LatvianDictionary_1.default();
|
|
7988
|
-
Translator.lituanianDictionary = new LituanianDictionary_1.default();
|
|
7989
|
-
Translator.dutchDictionary = new DutchDictionary_1.default();
|
|
7990
|
-
Translator.norwegianDictionary = new NorwegianDictionary_1.default();
|
|
7991
|
-
Translator.polishDictionary = new PolishDictionary_1.default();
|
|
7992
|
-
Translator.portugueseDictionary = new PortugueseDictionary_1.default();
|
|
7993
|
-
Translator.swedishDictionary = new SwedishDictionary_1.default();
|
|
7912
|
+
var dictionary = this.languaeDictionaries[language];
|
|
7913
|
+
return dictionary.get(key);
|
|
7914
|
+
};
|
|
7915
|
+
Translator.languaeDictionaries = {
|
|
7916
|
+
'da': new DanishDictionary_1.default(),
|
|
7917
|
+
'en': new EnglishDictionary_1.default(),
|
|
7918
|
+
'cs': new CzechDictionary_1.default(),
|
|
7919
|
+
'de': new GermanDictionary_1.default(),
|
|
7920
|
+
'el': new GreekDictionary_1.default(),
|
|
7921
|
+
'es': new SpanishDictionary_1.default(),
|
|
7922
|
+
'et': new EstonianDictionary_1.default(),
|
|
7923
|
+
'fi': new FinnishDictionary_1.default(),
|
|
7924
|
+
'fr': new FrenchDictionary_1.default(),
|
|
7925
|
+
'hu': new HungarianDictionary_1.default(),
|
|
7926
|
+
'is': new IcelandicDictionary_1.default(),
|
|
7927
|
+
'it': new ItalianDictionary_1.default(),
|
|
7928
|
+
'lv': new LatvianDictionary_1.default(),
|
|
7929
|
+
'lt': new LituanianDictionary_1.default(),
|
|
7930
|
+
'nl': new DutchDictionary_1.default(),
|
|
7931
|
+
'no': new NorwegianDictionary_1.default(),
|
|
7932
|
+
'pl': new PolishDictionary_1.default(),
|
|
7933
|
+
'pt': new PortugueseDictionary_1.default(),
|
|
7934
|
+
'sv': new SwedishDictionary_1.default(),
|
|
7935
|
+
};
|
|
7994
7936
|
return Translator;
|
|
7995
7937
|
}());
|
|
7996
7938
|
exports.default = Translator;
|