Skip to content

Language settings and translated interfaces ​

The example's saved WBP_AshenSettings screen includes English and Türkçe choices. Choosing either previews the language in the existing screen. Apply keeps it; Cancel, Back, and external deactivation restore the language present when the edit began. Defaults previews English, the example project's chosen default. The same compiled translations cover the RTS and RPG menus, confirmation dialogs, settings, HUD data, and notifications.

InterfaceForge uses Unreal's Text and culture systems. The game owns its localization target and supported cultures. Language is a global engine setting, so two local players cannot independently preview different languages with these nodes.

Reproduce the Blueprint workflow ​

Open Content/UI/Blueprint/WBP_AshenSettings. Use Get Game Instance Subsystem to obtain IFSettingsSubsystem.

In its Event Graph, search for IF Language / to find seven labeled sections: English preview, Turkish preview, incoming culture capture, Cancel rollback, owned-deactivation rollback, successful Apply commit, and Defaults preview. The two language click chains and two rollback chains have separate positions. Each preview is On Button Base Clicked → Branch (OwnsSettingsSession) → Set Current Language and Locale. These are ordinary editable Blueprint nodes; the editor-only layout helper adds comments and positions without replacing the runtime workflow. The following diagram names the actual nodes rather than relying on an unverified editor screenshot.

flowchart LR
    E[EnglishChoice: On Button Base Clicked] --> EB{OwnsSettingsSession}
    EB -->|True| EN[Set Current Language and Locale: en, Save=false]
    T[TurkishChoice: On Button Base Clicked] --> TB{OwnsSettingsSession}
    TB -->|True| TR[Set Current Language and Locale: tr, Save=false]
  1. On On Activated, call Begin Edit. Only after it succeeds, capture Get Current Language and Get Current Locale into String variables. Retain the existing OwnsSettingsSession gate when returning from a child screen.
  2. On a language button's click, branch on OwnsSettingsSession, then call Set Current Language and Locale with en or tr, Save to Config = false. Supported Text widgets update without replacing the widget tree. Use a culture-invariant autonym for language choices so users can recognize their language.
  3. On Cancel and owned On Deactivated cleanup, call Set Current Language and Set Current Locale using the captured values, both with Save to Config = false, then the existing Cancel preference operation. Cleanup is gated by edit ownership.
  4. On Apply, call InterfaceForge Apply. Branch on success. Only the success branch calls Get Current Language → Set Current Language and Get Current Locale → Set Current Locale, each with Save to Config = true, then clears ownership and deactivates the screen. A failed UI save retains the translated preview and visible error message.
  5. On Defaults, call Restore Defaults, then Set Current Language and Locale, culture en, Save to Config = false. Cancel still restores the previously committed culture.
flowchart LR
    A[Begin Edit succeeds] --> B[Capture language and locale]
    B --> C[Choose language: preview without saving]
    C --> D{Apply succeeds?}
    D -->|Yes| E[Save current language and locale to engine config]
    D -->|No| F[Keep draft and translated error visible]
    C --> G[Cancel or owned cleanup]
    G --> H[Restore captured language and locale]

Expected result: select Türkçe and see Uygula on Apply. Cancel restores the original language. Apply followed by a fresh packaged launch restores Turkish. Changing text scale still changes the same widgets; the longer RPG pause identity wraps beside its navigation cues.

The engine culture setters report whether the culture was accepted. Their Boolean result does not report a successful disk flush. InterfaceForge's UI preference save and Unreal's culture config are separate persistence operations. This example does not claim an atomic transaction across the two files. A platform that needs verified culture file I/O can add that policy to its own settings screen.

Translate your own screen and entries ​

Use Text variables for player-facing labels, tooltips, model fields, and formatted messages. Keep Text through Format Text, rather than converting it to String and back. Use named placeholders such as {Count} and preserve them in translations. Entries receive localized Text through the same public presentation/data-source contracts; they do not need a localization subclass or polling timer.

Create a project localization target in Unreal's Localization Dashboard. Gather both your widget packages and native runtime source, export PO files, translate, import, and compile. The example supplies the equivalent configuration in Config/Localization/ForgeExamples_Gather.ini and ForgeExamples_Compile.ini; its en/tr catalogs are in Content/Localization/ForgeExamples. The target name and directory name must agree with the generated resource names.

For commandlet authoring from the example directory:

powershell
& '<Engine>/Engine/Binaries/Win64/UnrealEditor-Cmd.exe' '<Project>/ForgeExamples.uproject' -run=GatherText '-config=Config/Localization/ForgeExamples_Gather.ini' -unattended -NullRHI
# Translate/exported PO, then import and compile:
& '<Engine>/Engine/Binaries/Win64/UnrealEditor-Cmd.exe' '<Project>/ForgeExamples.uproject' -run=GatherText '-config=Config/Localization/ForgeExamples_Compile.ini' -unattended -NullRHI

Tools/translate_example_tr.py authors the example's original Turkish catalog and rejects missing translations or altered placeholders. Buyers translate their own PO content; this tool is not a general translation service.

Register the project's target in DefaultGame.ini under [Internationalization], using +LocalizationPaths=%GAMEDIR%Content/Localization/<Target>. Select supported cultures under Project Settings → Packaging → Localizations to Package, and include suitable Internationalization Support. The example stages en and tr with InternationalizationPreset=All. Check the packaged staging manifest for the locmeta and each culture's locres; having a PO in the editor is insufficient.

Layout, fonts, and troubleshooting ​

The sample uses engine Roboto and tests Turkish Latin extended glyphs. Font replacement remains a normal theme choice. Supply an appropriate composite font and fallback coverage for additional scripts. CJK, right-to-left layout, localized voice/art, and platform font rendering are not certified by these Turkish tests.

Enable Auto Wrap Text for long headings, give reading bodies a scroll area, and keep Apply/Cancel outside it. Do not shrink accessibility text to hide clipping. The example's pause MenuPublisher uses standard Text Block wrapping inside a Fill slot, while the action cue rail retains its separate automatic width.

If text stays English, check gather coverage, stable Text identities, imported translations, compiled locres, target registration, and staged cultures. If the decimal/percentage format is unexpected, check Get Current Locale independently of language. PIE preview alone does not prove runtime locale formatting or persistence.

UE5.6.1 editor-game startup with the active Turkish catalog reports five errors from Epic's FStructuredLogFormatTest. The failure is reproduced in a minimal host with InterfaceForge disabled; the earlier host without a valid Turkish catalog silently fell back to English and was not a valid Turkish control. These logs are retained and strict source-reload verification stays failed. The tested Development package skips these engine startup smoke tests and its real culture persistence/restart checks pass. The exact newer-version and final-revision results belong in the runtime evidence, not an assumed compatibility claim.

Official foundations: Managing the Active Culture at Runtime, Localization Tools, and Localization Overview.

UIForge v0.1.0 · Blueprint and C++ development documentation.

Enlarged documentation image

Enlarged documentation image