How it works
The Kalenuxer build pipeline iterates over every JSON file it finds in datas/html/. For each language file, it runs the complete HTML pipeline — resolving template includes, substituting variables with that language's values, and writing the output HTML files to a language-specific subdirectory inside dist/release/.
HTML templates themselves never contain translated text. All user-facing strings — headings, paragraphs, button labels, meta descriptions, schema markup — live in the JSON data files. This means adding a new language requires no changes to any HTML file at all.
Language data files
Each language is represented by a single JSON file named with its ISO 639-1 language code:
datas/html/ en.json English tr.json Turkish de.json German fr.json French es.json Spanish ar.json Arabic ru.json Russian zh.json Chinese hi.json Hindi id.json Indonesian ka.json Georgian cs.json Czech it.json Italian pt.json Portuguese ja.json Japanese
Every language file must have the same key structure. Missing keys will result in empty substitutions in the output HTML. The safest workflow is to copy en.json as the starting point for any new language file.
Output structure
Each language produces its own complete directory of HTML output files. The directory name matches the language code:
dist/release/ index.html English homepage (default language) about.html product/ kalenuxer.html tr/ index.html Turkish homepage about.html product/ kalenuxer.html de/ index.html German homepage about.html ar/ index.html Arabic homepage (RTL)
Default language
English is the default language. Its output is written directly to the root of dist/release/ rather than to a en/ subdirectory. All other languages are written to their own subdirectory.
This means a user visiting example.com/about receives the English page, while a user visiting example.com/de/about receives the German page. No server-side language detection or redirects are required for basic multilingual support.
Adding a new language
Copy the English data file
Copy datas/html/en.json and rename it with the ISO 639-1 code for the new language, for example datas/html/pl.json for Polish.
Update the language metadata
Set the general.language.code value to the new language code and set general.language.type to ltr or rtl as appropriate.
Translate all string values
Replace every string value in the JSON file with the translated equivalent. Keep all keys identical to the English file — only the values change.
Rebuild
Run node run.js <site> prepare release -unsafe. The build will automatically detect the new language file and produce the additional output directory.
RTL languages
For right-to-left languages such as Arabic and Hebrew, the general.language.type key in the data file controls the dir attribute on the <html> element.
{ "general": { "language": { "code": "ar", "type": "rtl" } }}The
template reads this value and outputs <html lang="ar" dir="rtl"> automatically. Your CSS needs to account for RTL layout separately — Kalenuxer sets the attribute but does not apply RTL-specific layout rules.
Supported languages
The following languages are currently supported across Kalenux products:
Support for additional languages can be added by creating the corresponding data file. The build system imposes no limit on the number of languages.