Skip to main content

Unreal Engine 현지화 완벽 가이드

FText 매크로부터 로케일 폴백 체인까지, Localization Dashboard, String Table, C++, Blueprint, 자동 번역으로 UE5 게임을 현지화하는 방법을 알아보세요.

1

FText와 현지화 파이프라인

FText는 Unreal Engine에서 현지화를 지원하는 문자열 형식이에요. UI 레이블, 대화, 도구 설명, 알림처럼 게임에서 사용자에게 보이는 모든 문자열은 현지화 파이프라인에 포함되도록 FText를 사용해야 해요. FString은 내부 로직에만 사용하세요.

LOCTEXT에는 키와 원본 문자열이라는 두 인수가 필요해요. 키는 해당 네임스페이스 안에서 고유해야 해요. UE의 텍스트 수집기는 이 키로 문화권별 번역을 추적해요. NSLOCTEXT에서는 네임스페이스를 명시적으로 지정할 수 있고, LOCTEXT에서는 이를 감싸는 LOCTEXT_NAMESPACE 매크로에 정의된 네임스페이스를 사용해요.
FText Basics
// FText is UE's localization-aware string type.
// ALWAYS use FText for user-facing text, never FString.

// LOCTEXT: localize a literal string (most common)
FText Title = LOCTEXT("MainMenuTitle", "Start Game");

// NSLOCTEXT: specify namespace explicitly
FText Msg = NSLOCTEXT("UI", "WelcomeMessage", "Welcome, adventurer!");

// INVTEXT: invariant text (never translated — debug/logging only)
FText Debug = INVTEXT("Debug overlay active");

// FText::Format: safe variable interpolation
FText Greeting = FText::Format(
    LOCTEXT("PlayerGreeting", "Hello, {PlayerName}!"),
    FText::FromString(PlayerName)
);
MainMenuWidget.cpp
// In a UMG Widget (C++)
void UMainMenuWidget::NativeConstruct()
{
    Super::NativeConstruct();

    // Bind localized text to UI elements
    if (TitleLabel)
    {
        TitleLabel->SetText(LOCTEXT("GameTitle", "My Epic Game"));
    }

    if (PlayButton)
    {
        PlayButton->SetText(LOCTEXT("PlayButtonLabel", "Play Now"));
    }
}

// IMPORTANT: Always use LOCTEXT for UMG widget text.
// Setting text via FString bypasses the localization pipeline.
사용자에게 보이는 텍스트를 FString::Printf나 문자열 연결로 만들지 마세요. 이런 방식은 현지화 파이프라인을 완전히 우회하므로 결과 텍스트를 수집하거나 번역할 수 없고 RTL 언어에서도 올바르게 표시할 수 없어요. 대신 항상 LOCTEXT 패턴과 FText::Format을 사용하세요.
2

Localization Dashboard 설정

Localization Dashboard는 번역을 관리하는 UE 내장 도구예요. 소스 코드의 모든 LOCTEXT 및 NSLOCTEXT 문자열을 수집하고 번역용 .po 파일로 내보낸 다음, UE가 런타임에 로드하는 .locres 바이너리 파일로 컴파일해요.

Localization Dashboard Workflow
# 1. Open the Localization Dashboard:
#    Window > Localization Dashboard

# 2. Add a localization target (e.g., "Game")

# 3. Add cultures:
#    Click "Add New Culture" > select languages (de, ja, fr, es, ko, zh-Hans...)

# 4. Gather text:
#    Click "Gather Text" — UE scans all LOCTEXT/NSLOCTEXT macros

# 5. Export translations:
#    Click "Export" to generate .po files for each culture

# 6. Import translations:
#    After translating .po files, click "Import"

# 7. Compile translations:
#    Click "Compile" to generate .locres binary files

# 8. Preview:
#    Editor Preferences > Region & Language > Preview Game Language
LOCTEXT 매크로를 추가하거나 수정할 때마다 'Gather Text'를 실행하세요. 이 단계를 빠뜨리면 새 문자열이 .po 파일에 나타나지 않아 번역가가 볼 수 없어요. 빌드 자동화에 수집 단계를 추가해 누락을 자동으로 방지하세요.
3

데이터 기반 텍스트용 String Table

String Table을 사용하면 소스 파일 곳곳에 LOCTEXT 매크로를 두는 대신 현지화 문자열을 중앙 집중식 애셋에 정의할 수 있어요. UI 텍스트, 대화, 디자이너나 작가가 코드를 건드리지 않고 편집해야 하는 문자열에 적합해요. String Table은 UE 애셋으로 정의하거나 CSV에서 가져올 수 있어요.

StringTableUsage.cpp
// StringTables provide a data-driven approach to localization.
// Define strings in a CSV asset instead of scattering LOCTEXT across code.

// 1. Create a String Table asset:
//    Content Browser > Right-click > Miscellaneous > String Table

// 2. Or define via CSV (importable into UE):
// Key,SourceString
// MainMenu_Title,Start Game
// MainMenu_Continue,Continue
// MainMenu_Settings,Settings
// MainMenu_Quit,Quit to Desktop
// HUD_Health,Health
// HUD_Ammo,Ammo: {0}
// Dialog_Merchant_Greeting,Welcome to my shop!

// 3. Reference in C++:
FText Title = FText::FromStringTable(
    FName(TEXT("/Game/Localization/ST_MainMenu")),
    TEXT("MainMenu_Title")
);

// 4. Reference in Blueprints:
//    Use the "Make Text from String Table" node
//    Set Table ID and Key
Localization Dashboard가 String Table을 자동으로 수집해요. String Table에 정의된 문자열에는 LOCTEXT 매크로가 필요하지 않아요. C++ 또는 Blueprint에서 테이블 ID와 키로 참조하기만 하면 돼요.
4

C++ 현지화 패턴

C++에서는 각 .cpp 파일 위쪽에 LOCTEXT_NAMESPACE를 정의하고 사용자에게 보이는 모든 문자열에 LOCTEXT를 사용하세요. 변수가 있는 동적 콘텐츠에는 FText::Format을 사용하세요. 네임스페이스가 누출되지 않도록 파일 끝에서 항상 정의를 해제하세요.

MainMenuWidget.cpp
// Define a namespace at the top of each .cpp file
// All LOCTEXT calls in this file use this namespace
#define LOCTEXT_NAMESPACE "MyGame.MainMenu"

#include "MainMenuWidget.h"

void UMainMenuWidget::NativeConstruct()
{
    Super::NativeConstruct();

    // These use the "MyGame.MainMenu" namespace automatically
    TitleText->SetText(LOCTEXT("Title", "Main Menu"));
    PlayText->SetText(LOCTEXT("PlayButton", "Play"));
    SettingsText->SetText(LOCTEXT("SettingsButton", "Settings"));
    QuitText->SetText(LOCTEXT("QuitButton", "Quit"));
}

// CRITICAL: Always undefine at the end of the file
#undef LOCTEXT_NAMESPACE
FText::Format Examples
// FText::Format — the safe way to build localized strings
// NEVER use FString::Printf or string concatenation for user-facing text.

// Named arguments (recommended)
FText ItemPickup = FText::Format(
    LOCTEXT("ItemPickup", "You picked up {ItemName} x{Count}"),
    FText::FromString(ItemName),
    FText::AsNumber(Count)
);

// FText::AsNumber respects locale formatting:
//   English: 1,234,567
//   German:  1.234.567
//   French:  1 234 567

// FText::AsCurrency for prices:
FText Price = FText::AsCurrency(
    9.99,
    TEXT("USD"),
    &FInternationalization::Get().GetCurrentCulture().Get()
);

// FText::AsDate and FText::AsTime for dates:
FText DateStr = FText::AsDate(FDateTime::Now());
FText::Format 인수도 원시 FString이 아닌 FText여야 해요. FString 값은 FText::FromString()으로 변환하고, 로케일 인식 숫자 서식에는 FText::AsNumber(), 가격에는 FText::AsCurrency()를 사용하세요. 원시 FString을 연결하면 로케일 서식 규칙을 따르지 않는 텍스트가 만들어져요.
5

Blueprint 현지화

Blueprint의 모든 Text 속성은 기본적으로 FText이므로 이미 현지화할 준비가 되어 있어요. 문자열을 수집할 수 있도록 속성 세부 정보 패널에서 Key와 Namespace를 설정하세요. 변수가 있는 동적 콘텐츠에는 Format Text 노드를 사용하세요.

Blueprint Localization Patterns
// Blueprint Localization Basics:
//
// 1. All Text properties in Blueprints are FText by default
//    (already localization-ready)
//
// 2. Set the Text property in the Details panel
//    Expand the dropdown to set:
//    - Key: unique identifier for translation
//    - Namespace: grouping for organization
//    - Source String: the text to display/translate
//
// 3. For dynamic text, use the "Format Text" node:
//    Format: "Hello, {PlayerName}!"
//    Connect a "Find" pin named "PlayerName" to your variable
//
// 4. For plurals, use "Text Format with Arguments":
//    Pattern: "{Count}|plural(one=item,other=items)"
//
// 5. Culture switching at runtime:
//    Use "Set Current Culture" node
//    Input: culture code string (e.g., "de", "ja", "fr")
Blueprint Details 패널에서 텍스트 속성 드롭다운을 펼치면 Key, Namespace, Source String 필드를 볼 수 있어요. 의미가 분명한 Key를 설정하면 번역가가 .po 파일에서 문자열을 훨씬 쉽게 식별할 수 있어요.
6

복수형과 성별 처리

Unreal Engine은 복수형과 성별에 따른 텍스트를 위한 ICU 메시지 형식을 지원해요. 원본 문자열에 복수형 규칙을 정의하면 UE가 활성 문화권의 CLDR 규칙에 따라 올바른 형식을 자동으로 선택해요.

ICU Plural & Gender Rules
// UE uses ICU message format for plurals.
// Define plural rules in your .po or String Table:

// English source:
// "{Count}|plural(one=You have # item,other=You have # items)"

// German translation:
// "{Count}|plural(one=Du hast # Gegenstand,other=Du hast # Gegenstaende)"

// Arabic translation (6 forms):
// "{Count}|plural(zero=لا عناصر,one=عنصر واحد,two=عنصران,few=# عناصر,many=# عنصرًا,other=# عنصر)"

// Japanese (1 form):
// "{Count}|plural(other=アイテム#個)"

// In C++:
FText ItemCount = FText::Format(
    LOCTEXT("ItemCount",
        "{Count}|plural(one=You have {Count} item,other=You have {Count} items)"),
    ItemCount
);

// Gender-dependent text:
// "{Gender}|gender(masculine=Il est,feminine=Elle est) prêt{Gender}|gender(masculine=,feminine=e)"
단수를 감지하려고 count == 1을 하드코딩하지 마세요. 프랑스어에서는 0을 단수로 취급해요. 러시아어에는 'few'와 'many'에 해당하는 별도 형식이 있고 아랍어에는 복수형이 6가지 있어요. 로직은 ICU 복수형 규칙에 맡기세요. 필요한 형식을 모두 정의하면 UE가 문화권별로 올바른 형식을 선택해요.
7

현지화 패키징 및 테스트

출시하기 전에 모든 대상 문화권에 컴파일된 .locres 파일이 있고 텍스트가 런타임에 올바르게 렌더링되는지 확인하세요. 편집기의 문화권 미리 보기, 명령줄 문화권 재정의, 자동 검사를 사용해 누락되거나 손상된 번역을 찾아내세요.

Packaging & Testing Workflow
# Compile and test localization before packaging:

# 1. Editor Preferences > Region & Language > Preview Game Language
#    Set to each target language and verify all text renders correctly.

# 2. Command-line culture override for testing:
MyGame.exe -culture=ja

# 3. Packaging settings:
#    Project Settings > Packaging > Localizations to Package
#    Select all cultures you want to include in the build.

# 4. Verify .locres files exist after packaging:
MyGame/Content/Localization/Game/
├── en/
│   └── Game.locres
├── de/
│   └── Game.locres
├── ja/
│   └── Game.locres
├── fr/
│   └── Game.locres
└── ko/
    └── Game.locres

# 5. Runtime culture switching:
#    FInternationalization::Get().SetCurrentCulture(TEXT("ja"));
#    This reloads all FText strings from the new culture's .locres files.
문화권이 Project Settings > Packaging > Localizations to Package에 없으면 해당 .locres 파일이 빌드에서 제외돼요. 플레이어가 런타임에 그 언어를 선택하면 대체 텍스트나 빈 문자열이 표시돼요. 패키징 설정이 지원 문화권과 일치하는지 항상 확인하세요.
8

로케일 폴백 체인 추가

Unreal Engine의 기본 현지화는 IETF 하위 태그 계층을 따라서만 대체해요. pt-BR 사용자는 번역이 누락되면 사용 가능한 pt-PT 번역 대신 영어를 보게 돼요. locale-chain-ue는 FTextLocalizationManager를 통해 설정 가능한 지역 변형 간 폴백 체인을 추가하여 지역 사용자가 가장 가까운 번역을 볼 수 있게 해요.

locale-chain-ue (C++)
// locale-chain-ue: Smart fallback chains for UE5
// Problem: UE falls back to default when a locale is missing.
// pt-BR user gets English instead of pt-PT translations.

// Solution: One function call at startup.
#include "LocaleChain.h"

void UMyGameInstance::Init()
{
    Super::Init();
    ULocaleChain::Configure();  // Load 75 built-in fallback chains
}

// Now resolve strings with per-key fallback:
FString Greeting = ULocaleChain::Resolve(
    TEXT("greeting"), TEXT("MyNamespace")
);
// pt-BR user: tries pt-BR -> pt-PT -> pt -> default

// Custom overrides:
TMap<FString, FString> Overrides;
Overrides.Add(TEXT("pt-BR"), TEXT("pt"));       // Simplify chain
Overrides.Add(TEXT("sv-FI"), TEXT("sv"));        // Add new chain
ULocaleChain::ConfigureWithOverrides(Overrides);

// Full control (C++ only):
TMap<FString, TArray<FString>> Custom;
Custom.Add(TEXT("pt-BR"), {TEXT("pt-PT"), TEXT("pt")});
Custom.Add(TEXT("es-MX"), {TEXT("es-419"), TEXT("es")});
ULocaleChain::ConfigureCustom(Custom, false);
시작할 때 ULocaleChain::Configure()를 한 번 호출하면 11개 언어군을 아우르는 75개의 기본 제공 폴백 체인을 로드해요. Blueprint에서 쉽게 맞춤 설정하려면 ConfigureWithOverrides를, C++에서 폴백 동작을 완전히 제어하려면 ConfigureCustom을 사용하세요.

번역 품질 자동화

i18n-validate로 누락된 키와 손상된 플레이스홀더를 출시 전에 찾아내세요. 실제 번역이 도착하기 전에는 i18n-pseudo의 의사 번역으로 UI를 테스트하세요.

흔한 실수

사용자용 텍스트에 FString 사용

FString은 현지화 파이프라인 전체를 우회해요. FString::Printf나 문자열 연결로 만든 텍스트는 수집하거나 번역할 수 없고 RTL 언어에서도 올바르게 표시할 수 없어요. 사용자에게 보이는 문자열에는 항상 LOCTEXT 매크로가 있는 FText와 FText::Format을 사용하세요.

누락된 #undef LOCTEXT_NAMESPACE

.cpp 파일 끝에서 #undef LOCTEXT_NAMESPACE를 빠뜨리면 네임스페이스가 이후 번역 단위로 누출돼요. 다른 파일의 문자열에 오류 없이 잘못된 네임스페이스가 할당되어 번역이 잘못된 문맥에 나타나요.

하드코딩된 복수형 로직

'count == 1 ? singular : plural'을 작성하면 CLDR 규칙을 무시하게 돼요. 프랑스어는 0을 단수로 취급하고, 러시아어에는 4가지, 아랍어에는 6가지 복수형이 있어요. FText 패턴에 ICU 복수형 구문을 사용하고 문화권별 규칙은 UE에 맡기세요.

가져온 뒤 컴파일 누락

.po 파일을 가져오면 텍스트 데이터는 업데이트되지만 .locres 바이너리는 생성되지 않아요. 게임은 런타임에 이전에 컴파일된 번역을 계속 로드해요. 가져온 뒤에는 Localization Dashboard에서 항상 'Compile'을 실행하거나 빌드 자동화에 추가하세요.

권장 프로젝트 구조

Project Structure
MyUnrealProject/
├── Config/
│   └── Localization/
│       └── Game.ini                  # Localization target config
├── Content/
│   └── Localization/
│       ├── Game/
│       │   ├── Game.manifest         # Gather manifest
│       │   ├── en/
│       │   │   ├── Game.po           # Source strings (.po)
│       │   │   └── Game.locres       # Compiled binary
│       │   ├── de/
│       │   │   ├── Game.po
│       │   │   └── Game.locres
│       │   ├── ja/
│       │   │   ├── Game.po
│       │   │   └── Game.locres
│       │   └── fr/
│       │       ├── Game.po
│       │       └── Game.locres
│       └── StringTables/
│           ├── ST_MainMenu.uasset    # String Table asset
│           └── ST_HUD.uasset
├── Plugins/
│   └── LocaleChain/                  # locale-chain-ue plugin
│       ├── LocaleChain.uplugin
│       └── Source/
│           └── LocaleChain/
├── Source/
│   └── MyGame/
│       ├── UI/
│       │   ├── MainMenuWidget.h
│       │   └── MainMenuWidget.cpp    # LOCTEXT macros here
│       └── MyGameInstance.cpp        # ULocaleChain::Configure()
└── MyUnrealProject.uproject

지금 i18n Agent 사용해 보기

번역 파일을 여기에 드롭

JSON, YAML, PO, XML, CSV, Markdown, Properties

또는 클릭하여 파일 선택

대상 언어

가입 불필요즉시 견적

자주 묻는 질문