Skip to content

Localization - Overview

AchEngine Localization is a JSON / CSV based multilingual system. It supports locale switching, fallback locales, automatic system language detection, and type-safe key constant generation.

Core Components

ClassRole
LocalizationManagerFacade for locale switching and text lookup
LocalizationSettingsSettings ScriptableObject placed in Resources
LocaleDatabaseMaps locale lists to JSON files
LocalizedStringRuntime wrapper for multilingual text
L (generated class)Type-safe key constants produced by code generation

Basic Usage

csharp
using AchEngine.Localization;

// Lookup text in the current locale
string text = LocalizationManager.Get("menu.start");

// Type-safe key (after code generation)
string text2 = LocalizationManager.Get(L.Menu.Start);

// Change locale
LocalizationManager.SetLocale("ja");

// Subscribe to locale changes
LocalizationManager.OnLocaleChanged += OnLocaleChanged;

JSON Format

json
// ko.json - Korean
{
  "menu.start": "게임 시작",
  "menu.settings": "설정",
  "dialog.confirm": "확인",
  "item.sword.name": "철 검",
  "item.sword.desc": "평범한 철 검입니다."
}

Write JSON keys as a flat list using dot notation, without nested objects.

Automatic TMP Component Refresh

When you add LocalizedText to a TextMeshPro object, its text updates automatically whenever the locale changes.

[TextMeshProUGUI]
  └── LocalizedText  ← Key: "menu.start"

TMP Support

The LocalizedText component is enabled when TextMeshPro (com.unity.textmeshpro) is installed.

Next Steps

MIT License