i18n locale can now be specified with only the language code

This commit is contained in:
JC Brand 2017-02-13 15:16:16 +00:00
parent fddcd1c6cf
commit 48a3c30e75

View File

@ -188,6 +188,9 @@
moment.locale = moment.lang;
}
moment.locale(utils.detectLocale(this.isMomentLocale));
if (_.includes(_.keys(locales), settings.i18n)) {
settings.i18n = locales[settings.i18n];
}
this.i18n = settings.i18n ? settings.i18n : locales[utils.detectLocale(this.isConverseLocale)] || {};
// Translation machinery