# Interface translations The interface and startup splash support upstream's eight languages: Simplified Chinese (`zh`), English (`en`), Russian (`ru`), Vietnamese (`vi`), Spanish (`es`), Brazilian Portuguese (`pt`), Japanese (`ja`) and Korean (`ko`). Settings → Language saves the selection and updates open windows without reloading the main window. First-launch language selection, custom system images and background polling optimizations from upstream are preserved. `settings.uiLanguage` is the canonical preference. Existing `settings.language` values from earlier builds are migrated (`pt-BR` → `pt`, `zh-CN` → `zh`) when the canonical preference is absent. New installations follow the system language; existing upstream installations without a preference retain Chinese. Unsupported system languages use English. `src/core/i18n.js` shares one active language between both message formats: - Upstream's source-text dictionaries live in `src/i18n/*.json`; keep Chinese source strings as keys and preserve named or numbered placeholders. New upstream UI text continues to use this format and the `i18n-dom.js` display-layer observer. - Existing extracted UI and runtime messages remain in `src/locales/*.json`. Keep the same keys and numbered placeholders in all four catalogs. Do not renumber existing `mNNNN` keys. Prefer descriptive keys for runtime additions. Some messages contain trusted interface HTML; preserve markup and escape user content before interpolation. The shared module overlays the English, Brazilian Portuguese and Russian catalogs on source-text lookup where Chinese source messages match. `t()` supports both formats. `getCatalog()` serves the explicit-ID renderer via allowlisted `i18n:get` IPC. That renderer listens to upstream's `i18n:lang` notifications; explicitly marked nodes and attributes are excluded from the source-text observer to prevent competing DOM updates. Other upstream languages use their existing dictionaries with English fallback for explicit-ID messages without a matching translation. Upstream source-text lookup retains its Chinese fallback. No runtime dependency is added for internationalization. The four explicit-ID catalogs contain 1,383 messages each. The 347 runtime/diagnostic messages contributed in fork PR #2 have been translated into Brazilian Portuguese. Their Russian entries remain the contribution's English placeholders pending translation. English fallback does not mean that Russian runtime translation is complete. App names, package names, file paths, release notes and raw runtime logs are preserved. Some diagnostics emitted by underlying components still use Chinese. The built-in manual has Chinese (`src/ui/manual.html`) and English (`src/ui/manual.en.html`) versions; non-Chinese locales use English. Keep their section IDs and content in sync. Both include upstream's language-selection and custom-system-image sections. ## Validation ```powershell npm test npm run test:i18n npm run i18n:check npm run test:ui npm run test:ui:en npm run test:i18n:ui ``` The UI test uses mocked APIs in an isolated Electron window. It checks language switching across all eight languages without reloads, app-launch feedback and settings overflow, translated context menus, category navigation, cross-category search, diagnostic tutorial routing and both bundled/download splash variants. Screenshots are written to `test/out/i18n/`. It does not install APKs or alter the user's installation. Real Android app startup still needs a manual test. ## Local test installer ```powershell npm install npm run build:exe:test ``` Output: `dist/i18n-test/ApkStart--i18n.1-Setup.exe` (Windows x64). This unsigned, unpublished test build uses the same application ID and data paths as ApkStart. It omits the bundled Android runtime and reuses an existing runtime in the user data directory; missing runtime components download on demand. It must be installed in the same location as the current installation to replace that copy. The installer language and interface language can be selected independently. ## Teste em português 1. Feche o ApkStart pela opção Sair no ícone da bandeja do Windows. 2. Execute o instalador de teste e escolha a mesma pasta da instalação atual. 3. Abra Configurações → Idioma e selecione Português (Brasil). 4. Confira as telas, abra um app Android já instalado e teste a opção English. O instalador mantém o mesmo identificador e os mesmos caminhos de dados do projeto. Ele não inclui a imagem Android completa. Logs brutos e alguns diagnósticos internos ainda podem aparecer em chinês. A compilação é local e não publica uma versão ou PR.