How to use the ICU Message Format Generator.
ICU messages should preserve variables and include required fallback branches. Validate the generated message with the application's ICU parser and test representative counts in each target locale.
Make the workflow fit your task.
Specify the runtime, locale, variable names and desired singular, plural or selection behavior. Draft a message with the required fallback branch and preserve nested placeholders. Parse it with the application's ICU-compatible library and test representative values for each branch.
- What you provide
- Localized message requirements and variable definitions.
- What you get
- Plural and select message draft with syntax checks.
See the input and the result.
Illustrative input and output · a teaching example, not a live WebAct run
Example input
English message uses a variable named count and should show one item or multiple items.
Completed example
{count, plural, one {# item} other {# items}}
Check count values 0, 1 and 2 in the target runtime. Additional locales may require other plural categories.Load this input into the prompt, then copy it to WebAct to try the task. Your result may differ from the illustration.
Decisions and troubleshooting.
Is the English one/other plural pattern enough for every locale?
No. Plural categories vary by locale. Use the locale's rules and test the actual runtime's behavior.
Why does an ICU message render raw braces or fail to compile?
The destination may use a different message syntax or the nesting may be invalid. Validate with the same parser used by the application.
Reference for this workflow.
Try it with your own source.
Replace the example with your material in the task prompt. Keep the requirements you need, then copy the task into WebAct.
Customize and copy the task ↑