# 🌍 TRANSLATION TESTING GUIDE ## Quick Test Instructions ### 1. **Launch Game** ```bash npm start ``` ### 2. **Test Language Switching** #### **Main Menu Test:** 1. Click the **🌍 Globe button** (bottom-right corner) 2. Select each language: - 🇸🇮 **Slovenščina** (Slovenian) - 🇬🇧 **English** - 🇩🇪 **Deutsch** (German) - 🇮🇹 **Italiano** (Italian) - 🇨🇳 **中文** (Chinese) 3. Verify the menu text changes #### **In-Game Settings Test:** 1. Start a new game 2. Press **ESC** to open pause menu 3. Click **⚙️ Settings** 4. Click **🌍 LANGUAGE / JEZIK** section 5. Test switching between all 5 languages 6. Verify UI updates immediately ### 3. **Translation Coverage Test** Test these UI elements in each language: | Key | SLO | EN | DE | IT | CN | |-----|-----|----|----|----|----| | `ui.inventory` | Inventar | Inventory | Inventar | Inventario | 库存 | | `ui.crafting` | Izdelovanje | Crafting | Handwerk | Artigianato | 制作 | | `ui.health` | Zdravje | Health | Gesundheit | Salute | 健康 | | `ui.hunger` | Lakota | Hunger | Hunger | Fame | 饥饿 | | `ui.oxygen` | Kisik | Oxygen | Sauerstoff | Ossigeno | 氧气 | | `ui.day` | Dan | Day | Tag | Giorno | 天数 | | `ui.season` | Letni čas | Season | Jahreszeit | Stagione | 季节 | **Items:** | Key | SLO | EN | DE | IT | CN | |-----|-----|----|----|----|----| | `item.wood` | Les | Wood | Holz | Legno | 木材 | | `item.stone` | Kamen | Stone | Stein | Pietra | 石头 | | `item.seeds` | Semena | Seeds | Samen | Semi | 种子 | | `item.wheat` | Pšenica | Wheat | Weizen | Grano | 小麦 | | `item.corn` | Koruza | Corn | Mais | Mais | 玉米 | **Actions:** | Key | SLO | EN | DE | IT | CN | |-----|-----|----|----|----|----| | `action.plant` | Posadi | Plant | Pflanzen | Pianta | 种植 | | `action.harvest` | Požanji | Harvest | Ernten | Raccogli | 收获 | | `action.craft` | Izdelaj | Craft | Herstellen | Crea | 制作 | | `action.build` | Zgradi | Build | Bauen | Costruisci | 建造 | **Seasons:** | Key | SLO | EN | DE | IT | CN | |-----|-----|----|----|----|----| | `season.spring` | Pomlad | Spring | Frühling | Primavera | 春天 | | `season.summer` | Poletje | Summer | Sommer | Estate | 夏天 | | `season.autumn` | Jesen | Autumn | Herbst | Autunno | 秋天 | | `season.winter` | Zima | Winter | Winter | Inverno | 冬天 | **Messages:** | Key | SLO | EN | DE | IT | CN | |-----|-----|----|----|----|----| | `msg.demo_end` | Demo končan! Hvala za igranje. | Demo Ended! Thanks for playing. | Demo beendet! Danke fürs Spielen. | Demo terminata! Grazie per aver giocato. | 演示结束!感谢游玩。 | | `msg.freezing` | ❄️ Zmrzuješ! | ❄️ Freezing! | ❄️ Du erfrierst! | ❄️ Stai congelando! | ❄️ 你在冻僵! | | `msg.overheating` | 🔥 Pregrevanje! | 🔥 Overheating! | 🔥 Überhitzung! | 🔥 Surriscaldamento! | 🔥 过热! | ### 4. **Console Test** Open browser console (F12) and test: ```javascript // Test translation function window.i18n.setLanguage('de'); console.log(window.i18n.t('ui.inventory')); // Should print: "Inventar" window.i18n.setLanguage('it'); console.log(window.i18n.t('action.harvest')); // Should print: "Raccogli" window.i18n.setLanguage('cn'); console.log(window.i18n.t('season.spring')); // Should print: "春天" // Test fallback to English window.i18n.setLanguage('de'); console.log(window.i18n.t('nonexistent.key', 'Fallback')); // Should print: "Fallback" ``` ### 5. **Persistence Test** 1. Select **Deutsch** (German) 2. Close the game completely 3. Restart the game 4. Verify the game starts in **German** (saved in localStorage) --- ## ✅ Expected Results - ✅ All 5 languages display correctly - ✅ Language selection persists after restart - ✅ UI updates immediately when language changes - ✅ No missing translations (all keys have values) - ✅ Fallback to English works for undefined keys - ✅ Chinese characters render properly (中文) - ✅ German umlauts render properly (ä, ö, ü, ß) - ✅ Italian accents render properly (à, è, ì, ò, ù) --- ## 🐛 Known Limitations - ⚠️ Only 20 translation keys currently defined - ⚠️ Many UI elements still hardcoded in English - ⚠️ NPC dialogue not yet translated - ⚠️ Tutorial text not yet translated --- ## 📋 Next Steps for Full Localization 1. **Expand Translation Keys** (Priority: High) - Add menu buttons (NEW GAME, LOAD, SETTINGS, EXIT) - Add pause menu (RESUME, SAVE, QUIT) - Add crafting UI labels - Add building names - Add NPC names and dialogue 2. **Add More Languages** (Priority: Medium) - 🇫🇷 French (Français) - 🇪🇸 Spanish (Español) - 🇷🇺 Russian (Русский) - 🇯🇵 Japanese (日本語) - 🇰🇷 Korean (한국어) 3. **Create External JSON Files** (Priority: Low) - Move translations to `assets/localization/` folder - Easier for translators to contribute - Smaller code file size 4. **Add Translation Tool** (Priority: Low) - Script to check for missing keys - Auto-generate translation template - Validate all languages have same keys --- **Last Updated:** 12.12.2025 **Status:** ✅ 5 Languages Complete (20 keys each) **Coverage:** ~5% of total UI (estimated 400+ keys needed)