Skip to content

Commit

Permalink
Allow setting default UI language (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
webb-ben authored Apr 11, 2024
1 parent bdacfbe commit e1edf6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ window.VUE_APP_WAF='${WIS2BOX_URL}/data/'\n
window.VUE_APP_BASEMAP_URL='${WIS2BOX_BASEMAP_URL:-https://\{s\}.tile.openstreetmap.org/\{z\}/\{x\}/\{y\}.png}'\n
window.VUE_APP_BASEMAP_ATTRIBUTION='${WIS2BOX_BASEMAP_ATTRIBUTION:-&copy; <a href=\"https://osm.org/copyright\">OpenStreetMap</a> contributors}'\n
window.VUE_APP_CLUSTER='${WIS2BOX_UI_CLUSTER}'\n
window.VUE_APP_LANG='${WIS2BOX_UI_LANG}'
"
echo $env >> /usr/share/nginx/html/env.js
2 changes: 1 addition & 1 deletion src/locales/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export { loadLocale };

export default createI18n({
legacy: false, // Vuetify does not support the legacy mode of vue-i18n
locale: "en",
locale: loadLocale()[window.VUE_APP_LANG] !== undefined ? window.VUE_APP_LANG : "en",
fallbackLocale: "fr",
globalInjection: true,
messages: loadLocale(),
Expand Down

0 comments on commit e1edf6b

Please sign in to comment.