Skip to content

Poedit Setup (EN)

This guide covers the fastest and most stable Poedit workflow for this asset.

  1. In Unity, select translatable assets.
  2. Run Tools/Hyper PO Localization/Extract Strings.
    • You can also trigger this from the Project window context menu (right-click): Assets/Hyper PO Localization/Extract Strings.
    • Check the Unity Console for the extraction summary log (processed counts and manifest path).
  3. Run Tools/Hyper PO Localization/Create POT.
  4. Open:
    • Assets/StreamingAssets/Languages/<ProductName>.pot
  5. In Poedit, create a new translation from that POT.
  6. Save translation files as:
    • Assets/StreamingAssets/Languages/<language_code>.po
    • Example: es_ES.po

At runtime, language files are loaded from StreamingAssets/Languages.

Updating Existing Languages

When strings change:

  1. Select the changed translatable asset(s), then run Extract Strings.
  2. Run Update POT.
  3. In Poedit, update each existing .po from the new POT template.
  4. Save all updated .po files.

Poedit Project Settings Checklist

Verify:

  • Charset is UTF-8.
  • Plural forms are correct for the target language.
  • Paths are valid for your project structure.

Optional Flow (Poedit Source Parsing)

If you want Poedit to parse generated source files directly:

  • Folder: Assets/HyperMegaPixel/POLocalization/Temp
  • File pattern: *.php

Keywords to configure in Poedit:

  • _
  • pgettext:1c,2
  • ngettext:1,2
  • npgettext:1c,2,3

Alternative Flow (Scan C# Runtime Calls)

If you prefer Poedit to parse your C# runtime calls directly:

  • Folder: your gameplay scripts folder(s)
  • File pattern: *.cs

Keywords to configure in Poedit:

  • GetString:1
  • GetStringContext:1c,2
  • GetPlural:1,2
  • GetPluralContext:1c,2,3

Important:

  • Prefer using a single source per Poedit project (C# scan or Temp/*.php scan). If keys are identical, gettext merges them, but mixed sources can still produce noisy references or near-duplicates when context/plural/escaping differ.
  • Static parsing only detects literal arguments. Example: GetString("Quest Title") is detected, but GetString(dynamicKey) is not.
  • For dynamic keys that cannot be discovered statically, keep a ManualTranslations asset (Create/Hyper/Language/Manual Translations) and include those strings there.

Reference screenshot: Paths and Keywords

Poedit paths and keywords

"Update from Code" Workflow (Poedit)

If you prefer the Poedit button Update from Code, use this sequence:

  1. In Unity, run Tools/Hyper PO Localization/Extract Strings.
    • You can also trigger this from the Project window context menu (right-click): Assets/Hyper PO Localization/Extract Strings.
    • Check the Unity Console for the extraction summary log before running Update from Code.
  2. Open your target .po in Poedit.
  3. Click Update from Code.
  4. Make sure Poedit scans:
    • Assets/HyperMegaPixel/POLocalization/Temp
    • pattern *.php
  5. Save the updated .po.

Important:

  • Update from Code only sees strings currently present in generated .php files.
  • Extract Strings is selection-based: it only exports strings from the currently selected Unity asset(s).
  • Always re-run Extract Strings before updating, otherwise Poedit can miss new keys.
  • If extraction settings changed (regex/types), regenerate first, then update from code.

Reference screenshot: Update from Code

Poedit update from code

Troubleshooting

  • HPO-016: active language folder not found.
  • HPO-015: requested .po file not found.
  • If POT looks outdated: run Extract Strings before Create POT / Update POT.