Skip to content

Add multi-language translation support#28

Open
akrabi wants to merge 1 commit into
OpenKNX:mainfrom
akrabi:translations
Open

Add multi-language translation support#28
akrabi wants to merge 1 commit into
OpenKNX:mainfrom
akrabi:translations

Conversation

@akrabi

@akrabi akrabi commented Apr 8, 2026

Copy link
Copy Markdown

Add support for generating bilingual knxprod files following the KNX standard practice of embedding blocks with TranslationUnit and TranslationElement entries.

New --Translations (-T) CLI option on both 'create' and 'knxprod' verbs accepts a path to a JSON translation file or directory. After XML expansion (all IDs resolved), the tool:

  • Loads translation dictionaries (German text -> target language)
  • Walks all translatable elements (Parameters, Enumerations, ComObjects, CatalogItems, Products, Messages, etc.)
  • Generates a block
  • Merges with any existing block in the XML
  • The existing SplitXml in Toolbox.Sign handles distributing translations across Catalog.xml, Hardware.xml, and ApplicationProgram.xml

Add documentation to README.md with file format and usage examples.

Add support for generating bilingual knxprod files following the KNX
standard practice of embedding <Languages> blocks with TranslationUnit
and TranslationElement entries.

New --Translations (-T) CLI option on both 'create' and 'knxprod' verbs
accepts a path to a JSON translation file or directory. After XML
expansion (all IDs resolved), the tool:
- Loads translation dictionaries (German text -> target language)
- Walks all translatable elements (Parameters, Enumerations, ComObjects,
  CatalogItems, Products, Messages, etc.)
- Generates a <Languages><Language Identifier="en-US"> block
- Merges with any existing <Languages> block in the XML
- The existing SplitXml in Toolbox.Sign handles distributing translations
  across Catalog.xml, Hardware.xml, and ApplicationProgram.xml

Also removes dead code: the old inline ExportKnxprod implementation
(now in Toolbox.Sign), unused ExportXsd, and duplicate
DocumentCategory/GetDocumentCategory/AddTranslationUnit helpers.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@akrabi akrabi changed the title Add multi-language translation support via --Translations option Add multi-language translation support Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant