Spring

This example assumes that you do not have manually created messages.properties files yet. In case you do, you can follow this guidearrow-up-right on creating multiple sources of localized messages and adjusting the output filenames accordingly.

Step 1 - Create a translations file

Create a mooi directory

mkdir mooi

Within that directory, create a translations.yaml file with your strings

# ./mooi/translations.yaml

languages:    # English is assumed by default, you don't need to list it
  - de
  - fr
  - ru
  # etc.
entries:
  - key: myStringId
    value: Hello World
    description: A message that is shown on the main screen of the app
  # etc.

Step 2 - Define an output format

Within mooi directory, create a config.yaml file:

Step 3 - Run mooi

Run the following command:

You are good to go! Use the generated translations as you normally would.

Last updated