Skip to content

L10nization is a tool for extracting text to arb files for l10n or r13n in a Flutter application.

License

Notifications You must be signed in to change notification settings

lsaudon/l10nization

Repository files navigation

L10nization README

"L10nization" is a tool for extracting text to arb files for l10n or r13n in a Flutter application.

Features

  1. You must select the text with the quotes (like "Hello World").
  2. In the action code you will find Extract 'Hello World' to arb files.
  3. You can change the name of the key via the command.

Extract 'Hello World' to arb files

App Localizations Variable

By default, the variable used for AppLocalizations is l10n you can change it in the parameters as if below:

"l10nization.appLocalizationsVariable": "yourVariable"

By default, the extension launches flutter pub get via the Dart extension. You can disable it in the settings.

For r13n

To use the extension with r13n, the following parameters must be changed.

"l10nization.appLocalizationsVariable": "r13n", // or whatever you want.
"l10nization.yamlFile": "r13n.yaml"

Add description

You can add the description by enabling l10nization.haveMetadatas.

Add message in

You can choose if you want add new message with addNewMessagesIn in .

  • all: all files
  • template: only in template file

Sort arb files

You can use the command L10nization: Sort arb files.

Number format

Message “format” value Output for numberOfDataPoints(1200000)
"compact" "1.2M"
"compactCurrency" "$1.2M"
"compactSimpleCurrency" "$1.2M"
"compactLong" "1.2 million"
"currency" "USD1,200,000.00"
"decimalPattern" "1,200,000"
"decimalPercentPattern" "120,000,000%"
"percentPattern" "120,000,000%"
"scientificPattern" "1E6"
"simpleCurrency" "$1,200,000.00"

Date format

The extension does not check that it is correct.

For the Date format, you can select those already available or write your own.

Release Notes

For full release notes, see the changelog.