Skip to main content
Java .properties files store keyed resource strings for Java applications. Use this guide to translate resource values and understand escaping and writeback behavior. Supported extensions: .properties.

Source file

Save this example as locales/en-US/messages.properties.

Configure your files

Use this i18n.yml for the example, or add its file mapping to your existing bucket. See path templates for other layouts.

Translate

Install the CLI and set OPENAI_API_KEY in your project’s .env.local or shell. You can also configure another AI provider.
The dry run previews the work. The second command writes translations to the configured target path and updates the lockfile.

Behavior and limitations

  • Supports =, :, or unescaped whitespace separators, escaped characters, Unicode escapes, and continued lines.
  • Leading comments provide context. Writeback preserves keys, ordering, comments, separators, and spacing.
  • Translated values become single-line escaped strings. New keys are appended in sorted order.
  • Duplicate keys, malformed Unicode escapes, invalid UTF-8, and dangling continuations are rejected.

Next steps