mirror of
https://github.com/mealie-recipes/mealie.git
synced 2025-11-07 04:26:32 -05:00
Fix date picker not properly localized (#330)
* Fix language in date picker Vuetify allows custom-named locales, but the date-picker really only works with BCP 47 language tag * Save lang at proper time + Update Vuetify lang on the fly
This commit is contained in:
@@ -3,15 +3,14 @@ import Vuetify from "vuetify/lib";
|
||||
|
||||
Vue.use(Vuetify);
|
||||
|
||||
// language IDs should match those from VueI18n with _ instead of -
|
||||
import de_DE from 'vuetify/es5/locale/de';
|
||||
import en_US from 'vuetify/es5/locale/en';
|
||||
import fr_FR from 'vuetify/es5/locale/fr';
|
||||
import pl_PL from 'vuetify/es5/locale/pl';
|
||||
import pt_PT from 'vuetify/es5/locale/pt';
|
||||
import sv_SE from 'vuetify/es5/locale/sv';
|
||||
import zh_CN from 'vuetify/es5/locale/zh-Hans';
|
||||
import zh_TW from 'vuetify/es5/locale/zh-Hant';
|
||||
import de from 'vuetify/es5/locale/de';
|
||||
import en from 'vuetify/es5/locale/en';
|
||||
import fr from 'vuetify/es5/locale/fr';
|
||||
import pl from 'vuetify/es5/locale/pl';
|
||||
import pt from 'vuetify/es5/locale/pt';
|
||||
import sv from 'vuetify/es5/locale/sv';
|
||||
import zhHans from 'vuetify/es5/locale/zh-Hans';
|
||||
import zhHant from 'vuetify/es5/locale/zh-Hant';
|
||||
|
||||
|
||||
const vuetify = new Vuetify({
|
||||
@@ -42,16 +41,16 @@ const vuetify = new Vuetify({
|
||||
},
|
||||
lang: {
|
||||
locales: {
|
||||
de_DE,
|
||||
en_US,
|
||||
fr_FR,
|
||||
pl_PL,
|
||||
pt_PT,
|
||||
sv_SE,
|
||||
zh_CN,
|
||||
zh_TW
|
||||
'de-DE' : de,
|
||||
'en-US' : en,
|
||||
'fr-FR' : fr,
|
||||
'pl-PL' : pl,
|
||||
'pt-PT' : pt,
|
||||
'sv-SE' : sv,
|
||||
'zh-CN' : zhHans,
|
||||
'zh-TW' : zhHant
|
||||
},
|
||||
current: 'en_US',
|
||||
current: 'en-US',
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user