Skip to main content
gettext uses POT files as source message templates and PO files as locale catalogs. These catalogs can include message context and plural forms. For CLI generation, prepare a source-language .po with populated msgstr values. Direct .pot translation is not supported. Supported extensions: .po. Unreal Engine localization catalogs that export gettext .po files use the same parser.

Source file

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

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.

Unreal Engine rich text

Unreal Engine style tags close with nameless </>. Hyperlocalise treats each recognized tag as a placeholder so translators edit the surrounding words, not the markup. Writeback restores the original tags in the .po file, including tags that an existing target file moved or changed relative to the source. Save this source catalog as locales/en-US/messages.po:
In the Content Editor, each Unreal tag appears as a chip such as UE#0. Keep every chip. Translate only the visible words. {ItemName} stays a separate placeholder from the style tags around it. Attributes without double quotes, such as size='12' or size=12, are not Unreal tags. The following </> is still a tag. Converts at most 1000 Unreal tags in one entry. Further tags stay plain text and round-trip unchanged. Do not nest Unreal tags. The engine renders nested markup as literal text.

Behavior and limitations

  • Uses msgid as the entry key and msgstr as its value; multiline quoted continuations are supported.
  • Use a source-language PO with populated msgstr values for generation, as shown here. .pot is not a registered translation file extension.
  • The header entry is skipped. Context (msgctxt) does not distinguish keys, so avoid duplicate IDs distinguished only by context.
  • Plural handling maps only msgstr[0]; this is not full locale-specific plural generation. Writeback preserves PO structure and replaces mapped values. Unreal tags in msgstr[0] follow the same rules as other entries.
  • Unreal Engine rich-text tags in .po messages become placeholders during translation and return to the original markup on writeback. See Unreal Engine rich text.

Next steps