tSIP softphone: translating

I'm not a big fan of translating. Information is lost in translation. Lack of common naming makes it harder to debug any issue. Many technical terms are hard to translate and/or would be confusing after translating as they would not match names used by PABX.

Up to tSIP 0.1.74 editing resources was only option to translate application (besides recompiling). Most of what end user sees are programmable buttons with freely assigned names, but there are few fixed buttons like "Answer" and "Hangup". Their text (known in Borland/VCL as "Caption") is editable with resource editor:

Translating tSIP with resource editor

Weirdly XN Resource Editor seems to be not doing anything when using on tSIP 0.1.74. Resource Hacker from http://www.angusj.com/resourcehacker/ seems to still work though.

i18n

Support for i18n was added in tSIP 0.1.74.05 - at the moment it is limited to main window.

Translation files must be placed inside "translations" subdirectory, followed by locale code folder (e.g. "en_US", "pt_BR", "pl_PL") and named "translations.json". These as JSON files encoded in UTF-8 with key => text structure, same convention as used by i18n (one single, big JSON object with multiple keys, but object nesting is also supported).

As tSIP is not Unicode, UTF-8 is converted to local code page (code page specified in Windows settings for non-Unicode applications) when loading. Displayed characters would be limited to this set, other characters would be displayed as "?".

I've tested two translation tools (tools helping with editing i18n translation files) for JSON: https://github.com/jcbvm/i18n-editor (Java-based) and https://www.electronjs.org/apps/i18n-manager (Electron-based). One oddity that needed to be handled. here was converting by i18n-editor translations that have keys with dots inside to nested form. Both forms are not accepted by tSIP.
i18n-editor

Back to howto list


 "Cookie monsters": 6028087    Parse time: 0.001 s