Forked from
Forked from
I18N.md
This document explains how language support works in the Beledarians LM Studio Toolbox plugin and how to add new locale translations.
| Locale ID | Language | Script |
|---|---|---|
en | English | Latin |
zh-CN | Chinese (Simplified) | įŽäŊ䏿 |
zh-TW | Chinese (Traditional) | įšéĢ䏿 |
de | German | Latin |
The plugin uses a two-layer system to work around an architectural constraint in the LM Studio SDK: context.withConfigSchematics() can only be called once at plugin startup and cannot be updated afterwards.
I18N.md
This document explains how language support works in the Beledarians LM Studio Toolbox plugin and how to add new locale translations.
| Locale ID | Language | Script |
|---|---|---|
en | English | Latin |
zh-CN | Chinese (Simplified) | įŽäŊ䏿 |
zh-TW | Chinese (Traditional) | įšéĢ䏿 |
de | German | Latin |
The plugin uses a two-layer system to work around an architectural constraint in the LM Studio SDK: context.withConfigSchematics() can only be called once at plugin startup and cannot be updated afterwards.
displayName and subtitle labels visible in the LM Studio plugin settings panel.src/locales/i18n.ts detects the host OS language using:
Intl.DateTimeFormat().resolvedOptions().locale (primary â reliable on Windows/macOS)LC_ALL, LANGUAGE, LANG (fallback â for headless Linux/llmster)promptPreprocessor.ts reads the current value of this dropdown and looks up the matching dictionary.| OS Language | Message Language Dropdown | Result |
|---|---|---|
zh-TW | zh-TW | Full Traditional Chinese UI and runtime text |
en-US | zh-CN | English config panel, Simplified Chinese runtime hints |
de-DE | en | German config panel, English runtime hints |
src/locales/ âââ types.ts â Shared LocaleDict TypeScript interface (source of truth) âââ i18n.ts â Detection, resolution, lookup engine âââ en.ts â English dictionary âââ zh-CN.ts â Simplified Chinese dictionary âââ zh-TW.ts â Traditional Chinese dictionary âââ de.ts â German dictionary
src/locales/en.ts to src/locales/<locale>.ts (e.g., fr.ts).types.ts enforces that all keys are present. The build (npx tsc --noEmit) will fail if any key is missing.src/locales/i18n.ts and add two things:
import { fr } from "./fr";LOCALES registry: "fr": frresolveLocale() function, add a pattern match for the new locale's IETF tag (e.g., if (tag.startsWith("fr")) return "fr";).npx tsc --noEmitThe resolveLocale() function maps the following OS tags:
| System Tag | Routes to |
|---|---|
zh-TW, zh-HK, zh-MO, zh-Hant | zh-TW |
zh-CN, zh-Hans, zh-SG, zh | zh-CN |
Both dictionaries ship as full, independent translations â there is no silent fallback between zh-CN and zh-TW. Each receives its own complete string set appropriate to its regional vocabulary.
For RAG features with Chinese-language documents, the default nomic-ai/nomic-embed-text-v1.5-GGUF model has degraded performance on multi-byte Chinese characters. The zh-CN and zh-TW config subtitles explicitly recommend:
BAAI/bge-m3-gguf
Additionally, for Chinese documents, lowering the Retrieval Affinity Threshold to 0.35â0.45 (from the default 0.5) typically improves recall on Chinese technical text.
To contribute a translation or correction:
src/locales/.npx tsc --noEmit to confirm zero type errors.Chinese (zh-CN / zh-TW) review from native speakers is particularly welcome â please open an issue or PR if you spot unnatural phrasing in technical terms.
displayName and subtitle labels visible in the LM Studio plugin settings panel.src/locales/i18n.ts detects the host OS language using:
Intl.DateTimeFormat().resolvedOptions().locale (primary â reliable on Windows/macOS)LC_ALL, LANGUAGE, LANG (fallback â for headless Linux/llmster)promptPreprocessor.ts reads the current value of this dropdown and looks up the matching dictionary.| OS Language | Message Language Dropdown | Result |
|---|---|---|
zh-TW | zh-TW | Full Traditional Chinese UI and runtime text |
en-US | zh-CN | English config panel, Simplified Chinese runtime hints |
de-DE | en | German config panel, English runtime hints |
src/locales/ âââ types.ts â Shared LocaleDict TypeScript interface (source of truth) âââ i18n.ts â Detection, resolution, lookup engine âââ en.ts â English dictionary âââ zh-CN.ts â Simplified Chinese dictionary âââ zh-TW.ts â Traditional Chinese dictionary âââ de.ts â German dictionary
src/locales/en.ts to src/locales/<locale>.ts (e.g., fr.ts).types.ts enforces that all keys are present. The build (npx tsc --noEmit) will fail if any key is missing.src/locales/i18n.ts and add two things:
import { fr } from "./fr";LOCALES registry: "fr": frresolveLocale() function, add a pattern match for the new locale's IETF tag (e.g., if (tag.startsWith("fr")) return "fr";).npx tsc --noEmitThe resolveLocale() function maps the following OS tags:
| System Tag | Routes to |
|---|---|
zh-TW, zh-HK, zh-MO, zh-Hant | zh-TW |
zh-CN, zh-Hans, zh-SG, zh | zh-CN |
Both dictionaries ship as full, independent translations â there is no silent fallback between zh-CN and zh-TW. Each receives its own complete string set appropriate to its regional vocabulary.
For RAG features with Chinese-language documents, the default nomic-ai/nomic-embed-text-v1.5-GGUF model has degraded performance on multi-byte Chinese characters. The zh-CN and zh-TW config subtitles explicitly recommend:
BAAI/bge-m3-gguf
Additionally, for Chinese documents, lowering the Retrieval Affinity Threshold to 0.35â0.45 (from the default 0.5) typically improves recall on Chinese technical text.
To contribute a translation or correction:
src/locales/.npx tsc --noEmit to confirm zero type errors.Chinese (zh-CN / zh-TW) review from native speakers is particularly welcome â please open an issue or PR if you spot unnatural phrasing in technical terms.