Skip to content

Commit

Permalink
fix: il18n settings
Browse files Browse the repository at this point in the history
  • Loading branch information
donnyquixotic committed Feb 21, 2024
1 parent fc7ef74 commit e90e223
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/boot/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const i18n = createI18n({
locale: lastChosenLanguage,
globalInjection: true,
messages,
legacy: false,
});

export default boot(({ app }) => {
Expand All @@ -29,6 +30,10 @@ export default boot(({ app }) => {

// Listen for language-changed event
const setLocale = (newLanguage) => {
if (!newLanguage){
return;
}

const currentLanguage = localStorage.getItem('language');

if (newLanguage !== currentLanguage) {
Expand Down

0 comments on commit e90e223

Please sign in to comment.