dev-localization

Implements multi-language support in Unity games using the Localization package, string tables, and runtime locale switching.

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/Unity-UPM-Packages/Antigravity-skills --skill dev-localization-unity-upm-packages
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: dev-localization
Source: https://github.com/Unity-UPM-Packages/Antigravity-skills/tree/main/.agents/skills/dev-localization
Command: npx skills add https://github.com/Unity-UPM-Packages/Antigravity-skills --skill dev-localization-unity-upm-packages

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Hardcoded UI strings and single-language assumptions make mobile games expensive to ship in multiple markets. This Skill guides the full localization workflow in Unity, from deciding whether localization is needed to setting up string tables, dynamic text, and runtime locale switching. ## Core Features & Use Cases - Decision & Setup Guidance: Determines when localization is required and walks through installing the Unity Localization package, creating Localization Settings, and organizing string tables by domain (UI, HUD, gameplay, narrative). - Implementation Patterns: Provides code patterns for static text via LocalizeStringEvent, dynamic text with Smart Strings and variable substitution, pluralization rules, and localized assets like sprites and audio. - Runtime Locale Management: Implements locale switching without restart, platform locale auto-detection from device language, saved locale preferences via PlayerPrefs, and RTL layout handling for Arabic and Hebrew. - Use Case: A mobile game targeting English, Vietnamese, Japanese, and Korean markets needs all TextMeshProUGUI labels converted from hardcoded strings to LocalizedString references, with automatic device-language detection on first launch. ## Quick Start Ask the agent to set up Unity Localization for your project with English and Vietnamese string tables and convert all hardcoded UI text to LocalizedString references.

Frequently Asked Questions about dev-localization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add multi-language support to a Unity game?▼

Install the com.unity.localization package, create Localization Settings with your supported locales, then build String Tables per domain such as UI_Common or Gameplay_Prompts. Replace hardcoded text with LocalizeStringEvent components or LocalizedString references in code.

How to switch language at runtime in Unity Localization?▼

Set LocalizationSettings.SelectedLocale to the target Locale retrieved from LocalizationSettings.AvailableLocales. All LocalizeStringEvent components update automatically without restarting the app, and you can persist the choice with PlayerPrefs.

How do I localize dynamic text with variables in Unity?▼

Use Smart Strings in your String Table entries, such as "Score: {score}", then assign the Arguments property on the LocalizedString with an anonymous object containing your values. Call GetLocalizedString or RefreshString to evaluate the result.

Does Unity Localization handle pluralization for different languages?▼

Yes, Smart Strings support plural rules with syntax like {itemCount:plural:one=# item|other=# items}. Languages without plural forms, such as Vietnamese, simply use the variable directly in the translated string.

How do I detect the device language on first app launch?▼

Check for a saved locale preference in PlayerPrefs first, then fall back to Application.systemLanguage mapped to your supported locale codes. If the device language is unsupported, default to English.

When is localization not needed for a Unity game?▼

Localization is unnecessary when all in-game communication is icon-based with no readable strings, though Asset Tables may still be useful for culture-specific icons. Even single-language prototypes benefit from LocalizedString to ease later migration.