Skip to content

Commit

Permalink
fix: correctly load fallback language
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Lamas <[email protected]>
  • Loading branch information
pedrolamas committed Dec 8, 2022
1 parent 64a4e8a commit 095b093
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/plugins/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,12 @@ const startingLocale = getStartingLocale()
const i18n = new VueI18n({
locale: startingLocale,
fallbackLocale: import.meta.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
messages
messages: {}
})

// Pre apply the en language for fallback.
i18n.setLocaleMessage('en', messages)

const loadedLanguages: Locale[] = []

export const loadLocaleMessagesAsync = async (locale: Locale) => {
Expand Down

0 comments on commit 095b093

Please sign in to comment.