Localization (i18n)

Universal Game Launcher implements an industry-standard, library-driven internationalization architecture powered by i18next. Rather than hard-coding static translation dictionaries into the desktop binary, the launcher dynamically loads UI localization and gaming taxonomy directly from the HELIX Gaming DB REST API (https://api.helix-origin.club) with persistent offline caching.


๐ŸŒ Dynamic Cloud & Offline-First Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚             User Selects Language in Settings          โ”‚
โ”‚       (e.g., Japanese "ja", German "de", Russian "ru") โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚             Universal Game Launcher i18next            โ”‚
โ”‚         src/lib/i18n/index.ts ยท Svelte 5 Stores        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚
               Check local offline cache
              โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
              โ–ผ                           โ–ผ
      [Cache Hit]                 [Cache Miss / Stale]
Read SQLite Persistent KV      Fetch Remote i18n Bundle
  `i18n_bundle_{code}`           `https://api.helix-origin.club`
  Instant 0ms UI load            `/api/v2/i18n/{code}/bundle.json`
              โ”‚                           โ”‚
              โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                            โ”‚ Inject namespaces (app, genres,
                            โ”‚ categories, platforms, common)
                            โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         Instant Reactive UI Re-render ($t, $locale)    โ”‚
โ”‚    Zero layout shift ยท Bi-directional (RTL) Support    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โšก Key Architectural Advantages

1. Library-Driven & Extensible (No Hardcoded Strings)

All localization dictionaries reside centrally in the open-source HELIX Gaming DB catalog under locales/{code}/. Client applications load translations dynamically over HTTPS, allowing community translators to improve translations and add missing keys via Pull Requests without requiring a new desktop app release.

2. Dual UI & Metadata Taxonomy Support

The dynamic i18n bundle (/api/v2/i18n/{code}/bundle.json) delivers multi-namespace coverage in a single HTTP request:

  • app: Complete launcher UI dictionaries (navigation, library, settings, dialogs, status, errors).
  • genres: Localized video game genres (Action, Metroidvania, RPG, Visual Novel, etc.).
  • categories: Game categories (Single-player, Multi-player, Co-op, VR, etc.).
  • platforms: Platform labels (Windows, macOS, Linux, Steam Deck, Retro Consoles).
  • common: Universal UI strings (Save, Cancel, Refresh, Delete, Search, Loading).

3. High-Performance Offline Caching

When a language bundle is fetched from https://api.helix-origin.club, it is automatically persisted to the launcherโ€™s local SQLite Key-Value storage (i18n_bundle_{langCode}) with a 7-day retention period. When launching offline or on an airplane, the launcher instantly boots with the userโ€™s localized interface with zero network latency.

4. Robust Fallback Chains & Safe Interpolation

If an individual string or key has not yet been translated into a specific language, i18next automatically resolves the key from the fallback English (en) dictionary. Template parameters such as {count} or {games} interpolate safely without breaking formatting.

5. Native Bi-directional Layout (RTL)

The reactive $activeLanguage store automatically detects right-to-left languages (e.g. Arabic ar) and dynamically updates the document root with dir="rtl", flipping navigation bars, margins, and layout axes.


๐ŸŒ Supported Primary Languages

Language Code Storefront API Code Native Name Direction
English en english English Left-to-Right
Japanese ja japanese ๆ—ฅๆœฌ่ชž Left-to-Right
Simplified Chinese zh-CN schinese ็ฎ€ไฝ“ไธญๆ–‡ Left-to-Right
Traditional Chinese zh-TW tchinese ็น้ซ”ไธญๆ–‡ Left-to-Right
German de german Deutsch Left-to-Right
French fr french Franรงais Left-to-Right
Spanish (Spain) es spanish Espaรฑol (Espaรฑa) Left-to-Right
Italian it italian Italiano Left-to-Right
Portuguese (Brazil) pt-BR brazilian Portuguรชs (Brasil) Left-to-Right
Russian ru russian ะ ัƒััะบะธะน Left-to-Right
Korean ko koreana ํ•œ๊ตญ์–ด Left-to-Right
Polish pl polish Polski Left-to-Right