.claude/skills/localization-module/SKILL.md
LocalizationModule reference — multi-language support with JSON files, Steam language detection, reactive language switching, and localized asset paths. Use when working with localization, translations, or language switching.
npx skillsauth add punkfuncgames/tetris-clone localization-moduleInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Package: com.punkfuncgames.localization | Define: PUNKFUNC_LOCALIZATION
Location: Packages/com.punkfuncgames.localization/Runtime/PunkFuncGames.Localization/
Namespace: PunkFuncGames.Localization
Properties:
ReadOnlyReactiveProperty<SystemLanguage> CurrentLanguageIReadOnlyList<SystemLanguage> AvailableLanguagesbool IsLanguageLoadedLanguage Control:
SetLanguage(SystemLanguage language)UniTask PreloadLanguageAsync(SystemLanguage language, ct)UnloadLanguage(SystemLanguage language) — cannot unload current or fallbackText Retrieval:
string GetText(string key) — returns localized text, falls back to default language, then [key]string GetText(string key, params object[] args) — with string.Formatbool TryGetText(string key, out string value)bool HasKey(string key), IReadOnlyList<string> GetAllKeys()Asset Paths:
string GetLocalizedAssetPath(string basePath) — inserts language code before extension (e.g., icons/flag → icons/flag_en)Dependencies: LocalizationSettings (required), ISteamService (optional), 4 MessagePipe publishers
Language Detection Order:
Application.systemLanguage)File Loading: JSON files from Resources or Addressables
{ "ui": { "title": "Hello" } } → key "ui.title")"meta" sectionDual Dictionary System: Current language + fallback language for graceful degradation
LocalizationSettings (ScriptableObject): Thin wrapper with public LocalizationSettingsData data;
Access fields via _settings.data.fieldName.
LocalizationSettingsData ([Serializable] public struct, camelCase fields):
SystemLanguage defaultLanguage — EnglishSystemLanguage[] supportedLanguages — 10 defaults (en, es, fr, de, it, pt, ru, zh, ja, ko)string localizationFolder — "Localization"bool useAddressables, bool autoDetectLanguage, bool saveLanguagePreferencebool useFallback, bool returnKeyOnMissing, bool logMissingKeysExtension methods on LocalizationSettingsData:
GetLanguageFileName(SystemLanguage) → language code string (e.g., English → "en")IsLanguageSupported(SystemLanguage) → bool| Event | Key Fields |
|-------|------------|
| LanguageChangedEvent | PreviousLanguage, NewLanguage |
| LanguageLoadStartedEvent | Language |
| LanguageLoadCompletedEvent | Language, Success, StringCount |
| LocalizationKeyMissingEvent | Key, Language |
LocalizationInstaller.Install(builder, options, localizationSettings);
// Registers: LocalizationService as EntryPoint (ILocalizationService)
// Events: all 4 message brokers
// Get localized text
string title = _localization.GetText("ui.main_menu.title");
string formatted = _localization.GetText("ui.score", score);
// React to language change
_localization.CurrentLanguage
.Subscribe(lang => RefreshUI())
.AddTo(_disposables);
// Use LocalizedText component (auto-updates on language change)
// Attach to any GameObject with TMP_Text, set _key in inspector
// Get localized asset path for images
string path = _localization.GetLocalizedAssetPath("icons/flag"); // → "icons/flag_en"
development
WalletModule reference — currency management with BigDouble support, reactive properties, caps, lifetime stats, and persistence. Use when working with currencies, wallets, or financial systems.
development
UnlockConditionModule reference — composable unlock conditions using ScriptableObjects with AND/OR/NOT logic, stat/currency/upgrade/prestige/gamestate/boolean checks, reactive service layer with progress tracking. Use when implementing unlock systems, gating, or progression requirements.
development
UndoModule reference — command pattern with undo/redo stacks, command merging, and reactive state. Use when implementing undo/redo, undoable actions, or command patterns.
tools
Unity UI Toolkit reference — UXML documents, USS styling, MVVM pattern (ViewModel + Presenter), custom VisualElements, responsive layout, animations, performance guidelines, and complete Figma-to-UI-Toolkit property mapping. Use when building or modifying UI with UI Toolkit, creating UXML/USS files, writing ViewModels or Presenters, designing screens/panels/components, or converting Figma designs to UI Toolkit.