Merge pull request #22 from jonasheinrich/feature/more_languages
Loads all js localespull/6827/head
commit
b7fcc6566f
@ -1,2 +1,6 @@ |
||||
I18n.addTranslations('en', require('../../config/locales/js-en.yml').en); |
||||
I18n.addTranslations('de', require('../../config/locales/js-de.yml').de); |
||||
// load all js locales
|
||||
var localeFiles = require.context('../../config/locales', false, /js-[\w|-]{2,5}\.yml$/); |
||||
localeFiles.keys().forEach(function(localeFile) { |
||||
var locale = localeFile.match(/js-([\w|-]{2,5})\.yml/)[1]; |
||||
I18n.addTranslations(locale, localeFiles(localeFile)[locale]); |
||||
}); |
||||
|
Loading…
Reference in new issue