How to use the addResourceBundle function from i18next
Find comprehensive JavaScript i18next.addResourceBundle code examples handpicked from public code repositorys.
84 85 86 87 88 89 90 91 92 93
window.i18n = i18next console.log('adding language', lang, json) // for some reason, 'pt-br' was not working, use just pt instead const k = lang.split('-')[0] i18next.addResourceBundle(k, 'translation', json) const languages = {} updateAvailableLanguages() emitter.emit('render')
228
0
62
+ 3 other calls in file
GitHub: hubot-js/hubot.js
36 37 38 39 40 41 42
i18n.changeLanguage(locale); } } function addResourceBundle(lng, ns, resources) { i18n.addResourceBundle(lng, ns, resources); }
3
22
3