localization-module

Provide runtime localized text and asset path resolution for Unity projects.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/punkfuncgames/tetris-clone --skill localization-module
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: localization-module
Source: https://github.com/punkfuncgames/tetris-clone/tree/main/.claude/skills/localization-module
Command: npx skills add https://github.com/punkfuncgames/tetris-clone --skill localization-module

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This module removes the complexity of providing multi-language support in Unity projects by centralizing language detection, JSON-based translation loading, fallback handling, and reactive UI updates so games display the correct text and assets consistently across devices and platforms.

Core Features & Use Cases

  • Language detection and preferences: automatic detection via PlayerPrefs, Steam language, system language, or a configured default with optional saving of user preference.
  • Async JSON loading and flattening: load nested JSON translation files from Resources or Addressables, flatten nested keys to dot notation, and ignore meta sections.
  • Dual-dictionary fallback and graceful degradation: maintain current and fallback dictionaries so missing keys fall back to a default language or optional key return behavior.
  • Reactive runtime API: observable CurrentLanguage, SetLanguage, PreloadLanguageAsync, UnloadLanguage, GetText (with formatting), TryGetText, HasKey, GetAllKeys, and GetLocalizedAssetPath for language-specific asset naming.
  • Integration points: ScriptableObject localization settings, optional ISteamService for Steam language detection, MessagePipe events for language load/change notifications, and localization-aware UI components that auto-update.

Quick Start

Call the LocalizationService from your installer, preload or set the desired SystemLanguage, and refresh UI components to see localized text and language-specific asset paths immediately.

Frequently Asked Questions about localization-module

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

FAQPage Schema
How do I add Unity localization with JSON translation files?

To add Unity localization with JSON translation files, the module loads nested JSON files from Resources or Addressables and flattens keys to dot notation. It maintains current and fallback dictionaries so missing keys gracefully degrade to a default language.

How does runtime language detection work for Unity games on Steam?

Runtime language detection for Unity games on Steam works by checking PlayerPrefs, an optional ISteamService, system language, or a configured default. The module automatically detects and optionally saves the user's language preference during preload.

Can I load localized assets using Addressables and UniTask in Unity?

Yes, you can load localized assets using Addressables and UniTask in Unity. The module provides async UniTask-based language preload and unload functions, resolving language-specific asset paths via GetLocalizedAssetPath for Addressables integration.

What is the best way to handle missing translation keys in Unity i18n?

The best way to handle missing translation keys in Unity i18n is using a dual-dictionary fallback behavior. The module maintains current and fallback dictionaries so missing keys automatically fall back to a default language or return optional key behavior.

How do I make Unity UI text update reactively when changing languages?

To make Unity UI text update reactively when changing languages, the module uses MessagePipe events for language load and change notifications. Localization-aware UI components subscribe to these observable events and refresh automatically upon SetLanguage calls.

Does this Unity localization module require ScriptableObject configuration?

Yes, this Unity localization module requires ScriptableObject configuration. A LocalizationSettings ScriptableObject centralizes language detection preferences, default languages, and JSON loading sources to properly initialize the runtime localization service.