Fix locale handling
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
b57c75743e
commit
259ff64641
|
@ -1,7 +1,27 @@
|
||||||
import en_US from './en_US';
|
import en from './en_US';
|
||||||
import fr_FR from './fr_FR';
|
import fr from './fr_FR';
|
||||||
|
import cs from './cs';
|
||||||
|
import de from './de';
|
||||||
|
import es from './es';
|
||||||
|
import it from './it';
|
||||||
|
import ja from './ja';
|
||||||
|
import nl from './nl';
|
||||||
|
import oc from './oc';
|
||||||
|
import pl from './pl';
|
||||||
|
import pt from './pt';
|
||||||
|
import ru from './ru';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
en_US,
|
fr,
|
||||||
fr_FR
|
en,
|
||||||
|
cs,
|
||||||
|
de,
|
||||||
|
es,
|
||||||
|
it,
|
||||||
|
ja,
|
||||||
|
nl,
|
||||||
|
oc,
|
||||||
|
pl,
|
||||||
|
pt,
|
||||||
|
ru
|
||||||
}
|
}
|
|
@ -24,8 +24,9 @@ const language = (window.navigator as any).userLanguage || window.navigator.lang
|
||||||
Vue.use(VueI18n);
|
Vue.use(VueI18n);
|
||||||
|
|
||||||
const i18n = new VueI18n({
|
const i18n = new VueI18n({
|
||||||
locale: language.replace('-', '_'), // set locale
|
locale: language.split('-')[0], // set locale
|
||||||
messages, // set locale messages
|
messages, // set locale messages
|
||||||
|
fallbackLocale: 'en_US',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Register the router hooks with their names
|
// Register the router hooks with their names
|
||||||
|
|
Loading…
Reference in a new issue