Localization Setup
This guide shows you how to make text localizable in Unreal Engine so the AI Localization Automator can discover and translate it.
If you're already familiar with Unreal Engine's localization pipeline and have experience setting up FText, localization targets, and gathering text, you can safely skip this page and go directly to Getting Started.
This page covers the fundamental UE localization setup that's required before using any translation tools, including the AI Localization Automator.
If you're completely new to Unreal Engine's localization system, we highly recommend watching this short video tutorial first: Unreal Engine 5 Localization Tutorial.
After watching the video, most topics covered in this page will already be clear and understandable, and you'll most likely be able to skip this page and go directly to Getting Started.
The guide below covers general Unreal Engine localization setup and workflow - these steps are applicable to any translation project in UE, not just AI-powered translation. It's a reference for the fundamental localization concepts and setup process.
Understanding Localizable Text
For the AI Localization Automator to work, you need FText properties marked as localizable in your project. The plugin discovers text through UE's localization system, so text must be properly configured first.
FText vs FString vs FName
Only FText (Text in Blueprints) can be localized in Unreal Engine:
- ✅ FText: Localizable, supports rich formatting, used for user-facing text
- ❌ FString: Not localizable, used for internal data and file paths
- ❌ FName: Not localizable, used for identifiers and keys
Making Text Localizable in Blueprints
1. Create FText Variables
In your Blueprint classes:
- Add FText Variable
- Open your Blueprint class
- Add a new variable of type Text (FText)
- Set Default Value
- In the variable details, set your default text value
- This will become your source text for translation
- Enable Localization
- Click the flag icon located to the right of your text content
- In the localization window that opens, check the "Localize" checkbox - this is critical!
- Optionally set a custom Key and Namespace for organization
2. Where FText is Used
Once you have localizable FText variables, they can be used throughout the Unreal Engine ecosystem including: UMG widgets, HUD classes, GameMode/GameState for UI messages, Actor components for interaction prompts, dialogue systems, input action names, achievement/trophy descriptions, save game display text, console commands help text, editor tools, and any custom Blueprint or C++ system that displays user-facing content.
Making Text Localizable in C++
1. Use LOCTEXT Macros
For static text in C++:
// At the top of your file
#define LOCTEXT_NAMESPACE "MyGameUI"
// Create localizable text
FText WelcomeText = LOCTEXT("WelcomeMessage", "Welcome to the game!");
FText ButtonText = LOCTEXT("StartButton", "Start Game");
// At the end of your file
#undef LOCTEXT_NAMESPACE
2. Use NSLOCTEXT for Specific Namespaces
// For text with custom namespace/key
FText ScoreText = NSLOCTEXT("GameUI", "ScoreLabel", "Score: {0}");
FText HealthText = NSLOCTEXT("GameUI", "HealthDisplay", "Health");
3. FText Properties in Classes
UCLASS()
class MYGAME_API UMyUserWidget : public UUserWidget
{
GENERATED_BODY()
public:
// Localizable text property
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Localization")
FText DisplayText;
// Function returning localizable text
UFUNCTION(BlueprintCallable)
FText GetWelcomeMessage() const
{
return LOCTEXT("Welcome", "Welcome, player!");
}
};
Setting Up Localization Target
1. Create Localization Target
- Open Localization Dashboard (Tools → Localization Dashboard)
- By default, there should already be a Game target available to translate text from
- If there's no Game target, click "Add New Target" and enter "Game" as the name, and select Game as the Loading Policy
2. Configure Gather Settings
- Select your target in the dashboard
- Go to the "Gather Text" section in the Game panel