mirror of
https://github.com/jasonxu114514/opencode2api.git
synced 2026-12-05 08:02:53 +00:00
Translate the whole management console and let the operator pick a language without replacing the shipped copy. - webui/i18n.js holds the dictionaries only; the Simplified Chinese text stays in index.html and app.js and is the fallback for every untranslated string, so a new locale never rewrites the original. - Static text uses data-i18n / data-i18n-attr hooks, JavaScript text goes through t(); a locale switch re-renders both without a reload, and the choice persists in localStorage under opencode2api.ui.lang. - The switcher is a flag button in the toolbar and on the login card that opens a menu of every supported locale. Flags are inline SVG, because Unicode flag emoji renders as plain letters on Windows. - Ships 简体中文 (original), English and Tiếng Việt. - README.vi.md translates the full README; all three READMEs cross-link and document how to add a locale.