v1.18.x
psychobunny 9 years ago
parent eafa0837f1
commit a320ec3efb

@ -27,8 +27,18 @@
translator.addTranslation = function(language, filename, translations) {
languages[language] = languages[language] || {};
languages[language].loaded = languages[language].loaded || {};
languages[language].loaded[filename] = translations;
languages[language].loading = languages[language].loading || {};
if (languages[language].loaded[filename]) {
var existing = languages[language].loaded[filename];
for (var t in translations) {
if (translations.hasOwnProperty(t)) {
languages[language].loaded[filename][t] = translations[t];
}
}
} else {
languages[language].loaded[filename] = translations;
}
};
translator.getTranslations = function(language, filename, callback) {

Loading…
Cancel
Save