chore(i18n): swap es locale for fr
Site is bilingual French/English. Replace the boilerplate's en+es pair with en+fr; default locale becomes fr. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
30c4794520
commit
64dc250d63
4 changed files with 16 additions and 16 deletions
|
|
@ -1,10 +1,10 @@
|
|||
import { createI18n } from 'vue-i18n'
|
||||
import en from './locales/en.json'
|
||||
import es from './locales/es.json'
|
||||
import fr from './locales/fr.json'
|
||||
|
||||
export default createI18n({
|
||||
legacy: false,
|
||||
locale: 'en',
|
||||
locale: 'fr',
|
||||
fallbackLocale: 'en',
|
||||
messages: { en, es },
|
||||
messages: { en, fr },
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,11 +0,0 @@
|
|||
{
|
||||
"app": {
|
||||
"title": "Plantilla de Sitio Web"
|
||||
},
|
||||
"home": {
|
||||
"heading": "Bienvenido",
|
||||
"intro": "Edita src/views/HomeView.vue para empezar.",
|
||||
"counter": "Cuenta: {n}",
|
||||
"increment": "Incrementar"
|
||||
}
|
||||
}
|
||||
11
src/i18n/locales/fr.json
Normal file
11
src/i18n/locales/fr.json
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"app": {
|
||||
"title": "Modèle de site"
|
||||
},
|
||||
"home": {
|
||||
"heading": "Bienvenue",
|
||||
"intro": "Modifiez src/views/HomeView.vue pour commencer.",
|
||||
"counter": "Compteur : {n}",
|
||||
"increment": "Incrémenter"
|
||||
}
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ const { t, locale } = useI18n()
|
|||
const counter = useCounterStore()
|
||||
|
||||
function toggleLocale() {
|
||||
locale.value = locale.value === 'en' ? 'es' : 'en'
|
||||
locale.value = locale.value === 'en' ? 'fr' : 'en'
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
@ -26,7 +26,7 @@ function toggleLocale() {
|
|||
</div>
|
||||
|
||||
<button class="text-sm underline" @click="toggleLocale">
|
||||
Switch to {{ locale === 'en' ? 'Español' : 'English' }}
|
||||
Switch to {{ locale === 'en' ? 'Français' : 'English' }}
|
||||
</button>
|
||||
</main>
|
||||
</template>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue