Enable localization based on browser settings, add language selector (#925)

* Enable localization based on browser settings, add language selector

* Add dialog for language selection
This commit is contained in:
Philipp Fischbeck
2022-03-19 22:27:40 +01:00
committed by GitHub
parent 8f569509bf
commit 022cbd1616
5 changed files with 225 additions and 5 deletions

View File

@@ -170,7 +170,12 @@ export default {
// END: MESSAGE_LOCALES
],
lazy: true,
strategy: "no_prefix",
langDir: "lang/messages",
detectBrowserLanguage: {
useCookie: true,
alwaysRedirect: true,
},
defaultLocale: "en-US",
vueI18n: {
dateTimeFormats: {
@@ -208,8 +213,8 @@ export default {
"vi-VN": require("./lang/dateTimeFormats/vi-VN.json"),
// END: DATE_LOCALES
},
fallbackLocale: "en-US",
},
fallbackLocale: "es",
},
// Axios module configuration: https://go.nuxtjs.dev/config-axios