Fix i18n api changes in runtime/nodes

This commit is contained in:
Nick O'Leary 2018-09-18 10:31:44 +01:00
parent 2aae76c9bc
commit d34ebd4d1b
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 2 additions and 2 deletions

View File

@ -390,10 +390,10 @@ var api = module.exports = {
return new Promise(function(resolve,reject) {
var namespace = opts.module;
var lang = opts.lang;
var prevLang = runtime.i18n.i.lng();
var prevLang = runtime.i18n.i.language;
// Trigger a load from disk of the language if it is not the default
runtime.i18n.i.changeLanguage(lang, function(){
var catalog = runtime.i18n.getResourceBundle(lang, namespace);
var catalog = runtime.i18n.i.getResourceBundle(lang, namespace);
resolve(catalog||{});
});
runtime.i18n.i.changeLanguage(prevLang);