mirror of
https://github.com/bra1n/townsquare.git
synced 2025-04-04 22:24:36 +00:00
feat: [i18n] use default browser language
This commit is contained in:
parent
6a6a5ee165
commit
95924f7572
1 changed files with 6 additions and 2 deletions
|
@ -5,8 +5,8 @@ import { FontAwesomeIcon } from "@fortawesome/vue-fontawesome";
|
|||
import Vue from "vue";
|
||||
import VueI18n from "vue-i18n";
|
||||
import App from "./App";
|
||||
import translations from "./assets/translations/en.json";
|
||||
import store from "./store";
|
||||
import en from "./assets/translations/en.json";
|
||||
|
||||
const faIcons = [
|
||||
"AddressCard",
|
||||
|
@ -66,6 +66,10 @@ Vue.use(VueI18n);
|
|||
|
||||
new Vue({
|
||||
render: h => h(App),
|
||||
i18n: new VueI18n({ locale: "en", fallbackLocale: "en", messages: { en } }),
|
||||
i18n: new VueI18n({
|
||||
locale: navigator.language || navigator.userLanguage,
|
||||
fallbackLocale: "en-US",
|
||||
messages: { "en-US": translations }
|
||||
}),
|
||||
store
|
||||
}).$mount("#app");
|
||||
|
|
Loading…
Add table
Reference in a new issue