TT#55909 i18n: Fix language label retrieval

Change-Id: I5f9863ae1c2269ea6d47764b1d04cdcf19d85fa0
changes/67/28367/1
Hans-Peter Herzog 6 years ago
parent 1fc7d7c848
commit fbb97b1da2

@ -1,4 +1,5 @@
import _ from 'lodash'
import Vue from 'vue'
import VueI18n from 'vue-i18n'
import localeEn from './locales/en'
@ -33,6 +34,11 @@ export function getLanguageLabels() {
}
export function getLanguageLabel(locale) {
if(_.has(i18n.messages, locale)) {
return i18n.messages[locale].languageLabel;
}
else {
return i18n.messages[defaultLocale].languageLabel;
}
}

Loading…
Cancel
Save