Overview
Scorpiox Code ships with 13 languages compiled into a single static binary. No external locale files, no resource bundles, no runtime dependencies. The CLI auto-detects your system locale via LANG, LC_ALL, and LC_CTYPE environment variables. The web interface parses Accept-Language headers. Fallback is always English.
Supported Languages
| Code | Language | Native Name | Direction | Coverage |
|---|---|---|---|---|
en |
English | English | LTR → | 100% |
ar |
ArabicRTL | العربية | RTL ← | 100% |
de |
German | Deutsch | LTR → | 100% |
es |
Spanish | Español | LTR → | 100% |
fr |
French | Français | LTR → | 100% |
it |
Italian | Italiano | LTR → | 100% |
ja |
Japanese | 日本語 | LTR → | 100% |
ko |
Korean | 한국어 | LTR → | 100% |
pt |
Portuguese | Português | LTR → | 100% |
ru |
Russian | Русский | LTR → | 100% |
tr |
Turkish | Türkçe | LTR → | 100% |
zh-CN |
Chinese (Simplified) | 简体中文 | LTR → | 100% |
zh-TW |
Chinese (Traditional) | 繁體中文 | LTR → | 100% |
Locale Detection
CLI Detection
The CLI reads LANG, LC_ALL, and LC_CTYPE environment variables at startup via setlocale(LC_ALL, ""). On Windows, scorpiox-config.c uses setlocale(LC_ALL, ".UTF-8"). Inside containers, scorpiox-unshare.c sets LANG=C.UTF-8 as default.
setlocale(LC_ALL, "") in sx.c, scorpiox-debug.c, scorpiox-conv.csetlocale(LC_ALL, ".UTF-8") in scorpiox-config.c (Windows)setenv("LANG", "C.UTF-8") in scorpiox-unshare.c
Website Detection
The website uses detect_lang(environ) — first checks ?lang= query parameter, then parses the Accept-Language HTTP header. Partial matches are supported: "zh" matches "zh-CN", "de" matches "de". Fallback is English.
Website Translation System
The website uses a Python T dictionary pattern: T[key][lang]. Each page file defines translation keys for all 13 languages. The detect_lang() function checks ?lang= query parameters first, then parses Accept-Language headers. All 411 translation keys across 21 page files maintain 100% coverage for every language.
Unicode Support
Full UTF-8 encoding with wide-character support for CJK glyphs and emoji rendering. Terminal width calculations handle double-width characters correctly. The implementation spans 20 source files including sx_term.c for terminal width, sxui_input.c for wide-character input, and sx_html_strip.c for UTF-8 safe HTML parsing.
Configuration
Source Files
Unicode handling is implemented across 20 source files. Key implementation files include sx_term.c/h for terminal width calculations, sxui_input.c for wide-character input, and sx_html_strip.c for UTF-8 safe HTML parsing.
sx_term.csx_term.hsx_statusbar.cscorpiox-grep.clibsxutil/sx_json_yy.clibsxutil/sx_json_yy.hlibsxutil/sx_html_strip.clibsxutil/sx_wsl.clibsxui/sxui_input.clibsxui/sxui_input.hsxmux_vt.csxmux_vt.hscorpiox-vi.cscorpiox-editfile.cscorpiox-readfile.cscorpiox-whatsapp.cscorpiox-beam.cscorpiox-unshare.csx.csx_dll.h