Skip to content

v5 Migration Guide

Major version 5 introduces a completely new plugin core and is essentially a complete rewrite of the software. As a result, there is a completely new configuration that cannot be migrated automatically.

The biggest new feature is that an open project in the IDE now supports multiple translation modules simultaneously. For example, for frontend and backend monorepos. Additionally, translation sources can now be defined using a completely free template syntax. Finally, the editor now offers freely configurable rules to provide support for translation elements within the editor.

To adapt to the new major version, try out some of the presets already available to better understand how the template syntax works.


Changes

  • Configuration option Default namespace has a drop-in replacement called Default key prefixes with support for multiple defaults.
  • Configuration option I18n flavor template should define the {i18nKey} placeholder parameter. Example: $i18n.t("{i18nKey}").

Single directory

# All translation files are within a single directory (e.g. $PROJECT_DIR$/locales/[de.json|en.json|...])

# Path template
$PROJECT_DIR$/locales/{locale}.json

# File template
[{fileKey}]

# Key template
{fileKey:.}

Modularized: Locale / Namespace

# All translation files are structured within a two-level directory structure (e.g. $PROJECT_DIR$/locales/de/user.json)

# Path template
$PROJECT_DIR$/locales/{locale}/{pathNamespace}.json

# File template
[{fileKey}]

# Key template
{pathNamespace}:{fileKey:.}

Modularized: Namespace / Locale

# All translation files are structured within a two-level directory structure (e.g. $PROJECT_DIR$/locales/user/de.json)

# Path template
$PROJECT_DIR$/locales/{pathNamespace}/{locale}.json

# File template
[{fileKey}]

# Key template
{pathNamespace}:{fileKey:.}

For further information, see the configuration chapter.


Post migration steps

Remove old configuration state

The old configuration state could be deleted after a successful migration to v5. Delete the section <component name="ProjectSettingsService">...</component> inside the plugin file .idea/easy-i18n.xml.