mirror of
https://github.com/vale981/Vulcan
synced 2025-03-06 18:11:40 -05:00

Translations is referenced with i18n.translations[lang][str], so it should be changed to be an object. I think it should be used something like below. e.g. translations: { kr:{ 'Please fill in a headline': '빈칸 채우라고' } }
19 lines
335 B
JavaScript
19 lines
335 B
JavaScript
i18n = {
|
|
|
|
translations: {},
|
|
|
|
t: function (str) {
|
|
var lang = getSetting('language', 'en');
|
|
if(i18n.translations[lang] && i18n.translations[lang][str]){
|
|
return i18n.translations[lang][str];
|
|
}
|
|
return str;
|
|
}
|
|
|
|
};
|
|
|
|
if(Meteor.isClient){
|
|
UI.registerHelper('i18n', function(str){
|
|
return i18n.t(str);
|
|
});
|
|
}
|