Multi Language
Multi Language Settings
Let's add the French language.
- Create a new file fr.json in the fr folder in the
src/app/localesfolder. Import that file intosrc/app/locales/index.tsfile. -
Now update the below code in the
src/app/locales/flags.tsfile. Add below code in flagByLanguage.{ flag: frFlag // add svg file in flags folder and then import it here, language: "fr", title: "French", } - To change default language to french? update below code in the
src/plugins/i18n.tsfilecreateI18n({ ... const locale: string = process.env.VUE_APP_I18N_LOCALE || "fr"; const fallbackLocale: string = process.env.VUE_APP_I18N_FALLBACK_LOCALE || "fr"; ... })