The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Rocket.Chat/packages/rocketchat-lib/client/CustomTranslations.js

18 lines
504 B

Meteor.startup(function() {
Meteor.autorun(function() {
let CustomTranslations = RocketChat.settings.get('Custom_Translations');
try {
CustomTranslations = JSON.parse(CustomTranslations);
} catch (e) {
console.error('Invalid setting Custom_Translations', e);
}
for (const lang in CustomTranslations) {
if (CustomTranslations.hasOwnProperty(lang)) {
const translations = CustomTranslations[lang];
TAPi18next.addResourceBundle(lang, 'project', translations);
}
}
});
});