# 1. Localization - Install, Locales and String Tables Part of [[Localization]]. Next: [[2. Localizing UI Toolkit and uGUI Text]]. > [!note] Verification status > Steps follow the Localization 1.5 Installation and Quick Start pages; menu paths may be worded slightly differently in 6000.5. Package version: 1.5.13 listed for 6000.5, 1.5.14 newest in the changelog (2026-11-10). No code in this part. ## 1.1 Install 1. **Window > Package Manager > Unity Registry > Localization > Install** (or *Add package by name* `com.unity.localization`). It pulls in **Addressables** as a dependency - localized tables are Addressable assets. 2. **Edit > Project Settings > Localization > Create** a **Localization Settings** asset. Save it in `Assets/Localization/`. ## 1.2 Locales 1. In the Localization project settings, **Locale Generator**. Tick the languages you need. Start with three that stress different things: - `en` - source language. - `de` - long words (layout expansion). - `ja` - non-Latin script (font coverage, no spaces for line breaking). 2. **Generate Locales** writes one `Locale` asset per language. 3. Set **Project Locale** (the language you author in) to English. 4. **Startup Locale Selectors** (order matters, first non-null wins): *Command Line* -> *Player Pref* -> *System* -> *Specific (English)*. Part 5 explains why Player Pref comes before System. ## 1.3 String Table Collections A **String Table Collection** = one **Shared Table Data** (keys and IDs) + one **String Table** per locale (the values). 1. **Window > Asset Management > Localization Tables > New Table Collection.** Type **String Table Collection**, name `UI`. Tick all locales. Create. 2. Make more collections by *domain*, not by screen: `UI`, `Items`, `Quests`, `Dialogue`, `Tutorial`. Small collections load faster and conflict less in version control. 3. Add entries in the Tables window: one row per key, one column per locale. ### Key naming Keys are for humans and diffs; IDs are what references store by default. | Good key | Why | |---|---| | `hud.health.label` | Domain.element.role - sorts well, greps well | | `menu.button.continue` | The same word in different places gets different keys (translators need context) | | `quest.wolf_trouble.title` | Ties to the asset id used in [[Quest Systems]] | Never reuse a key because two English strings happen to match: "Close" (door) and "Close" (near) are different words in most languages. ## 1.4 Comments for translators Every entry can carry metadata. Add a **Comment** to anything ambiguous: maximum length, where it appears, what `{0}` means. It costs seconds and saves rounds of bug reports. ## 1.5 Preloading and Addressables - Tables load asynchronously on first use. Mark small, always-needed tables (`UI`) as **Preload** in the table collection so the first frame of the menu isn't blank. - Tables are Addressables, so a player build must include an Addressables build. Check **Addressables settings > Build Addressables on Player Build** (or build Addressables manually) before building - missing tables at runtime is the classic first-build bug. ## 1.6 Version control Table assets are YAML; String Tables merge reasonably with Smart Merge ([[3. UnityYAMLMerge Smart Merge]]). Still, avoid two people editing the same collection at once - split collections by domain (1.3) and see [[Version Control]]. ## 1.7 Exercise Create `UI` with 10 keys for a main menu and HUD. Fill English, leave German and Japanese empty. Part 6's missing-translation report will find them. ## Sources - Installation: https://docs.unity3d.com/Packages/[email protected]/manual/Installation.html - Quick start: https://docs.unity3d.com/Packages/[email protected]/manual/QuickStartGuideWithVariants.html - String Tables: https://docs.unity3d.com/Packages/[email protected]/manual/StringTables.html - Addressables integration: https://docs.unity3d.com/Packages/[email protected]/manual/Addressables.html - Startup Locale Selectors: https://docs.unity3d.com/Packages/[email protected]/manual/LocaleSelector.html