Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update i18n module and adapt config folder and trad files #203

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

timothejoubert
Copy link
Contributor

No description provided.

@timothejoubert
Copy link
Contributor Author

timothejoubert commented Dec 12, 2024

  • i18n locale data don't persist SSR/client
  • enable detectBrowserLanguage
  • Add locale starter file for globals components (error_page, form, breadcrumb, carousel...), all the keys should be override

@manuelodelain manuelodelain marked this pull request as draft December 13, 2024 13:06
@timothejoubert timothejoubert marked this pull request as ready for review December 13, 2024 15:53
},
{
code: locale,
file: `nuxt.${locale}.default.json`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's a good idea to split translations into multiple files. The default file won't be available into xilofone

Comment on lines +3 to +5
export function isAvailableI18nLocale(locale: string): locale is typeof I18N_LOCALES[number] {
return (I18N_LOCALES as unknown as string[]).includes(locale)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should only rely on Nuxt I18n at runtime, not on constants. All the available translations are available on $i18n.locales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

i18n: use user preferred language I18n: update the structure
2 participants