github nuxt-modules/i18n v9.0.0

one day ago

We're happy to announce the stable release of v9!

The primary focus of this major release is to remove deprecated functionality and upgrade Vue I18n to v10, we did manage to sneak in some enhancements listed below.

🚨 Breaking changes

This update includes breaking changes so please make sure to review these in the migration documentation, if you run into problems during migration please open an issue so we can improve the guide!

📂 Directory restructure

We now use a default directory structure that is consistent with directory structure changes in Nuxt 4.

Here is an example of a project structure after this change:

app/
server/
i18n/
  locales/
    en.json
    ja.json
  i18n.config.ts
  localeDetector.ts
nuxt.config.ts

This can be configured with the restructureDir option which is set to i18n by default, see the docs for more details.

🛣️ Route type generation

Code_2024-09-27_12-02-50.mp4

Experimental route type generation improves DX for all route utilities and components by adding autocompletion and stricter type checks.

This feature can be enabled with the experimental.typedPages option, see the docs for more details.

⌨️ Messages and vue-i18n type generation

Code_2024-07-17_14-54-20.mp4

Experimental messages and vue-i18n options type generation improves DX by adding autocompletion and type safety for translation functions and configuration.

This feature can be enabled with the experimental.typedOptionsAndMessages option, see the docs for more details.

    View changes on GitHub

Don't miss a new i18n release

NewReleases is sending notifications on new releases.