JOC Cockpit ships with language files that include translations for the following languages:
Additional languages can be added for new releases. SOS accepts community contributions for language files provided that the contributor:
- provides quality assurance for a correct translation and
- commits to on-going language support in subsequent releases for a minimum of one year.
Language File Location
Language files are included with the JOC Cockpit .war archive file that is extracted on start-up of the service. The extraction is performed to the
temp folder that can be found in the following directory hierarchy:
- When starting JOC Cockpit a temporary directory is created with the
- Language files with the following folder structure can be found in the temporary directory hierarchy:
Language File Development
Adding new Language Files
- Open the
locales.jsfile to find a single array to which you add a new language by specifying country code, language code, country name and language name like this:
- Create a new general language file - preferably by starting from a copy of the English general language file
en.jsonand the naming convention
- Translate the assignments for each line of the general language file.
- Create a new editor language file - preferably by starting from a copy of the English editor language file
json-editor-text_en.jsonand the naming convention
- Translate assignments for each line of the editor language file.
- Language files use a JSON format and can be modified with any text editor.
- Be careful when it comes to use of quotes and commas that have to be in place as shown in the examples. A missing quote or comma invalidates a language file.
- Validate your language files with a JSON validator utility - a number of online resources are available.
- Language files are read by JOC Cockpit on first use. Any changes to a language file after this point in time are not considered.
- Therefore the following development cycle applies:
- Store the working copy of your general language file and editor language file in a folder outside of the JOC Cockpit installation.
- Start the JOC Cockpit service/daemon.
- Copy the your language files and the
locales.jsonfile to the target folder as indicated with the section above.
- Log in to JOC Cockpit and optionally modify your user profile to use the newly added language. Any new language added to
locales.jsonshould become available with your profile.
- Test your changes to the language files.
- Any modifications to the language files are not immediately considered but require a restart of JOC Cockpit as in step 2).
Language File Build Integration
- For integration in our build procedure please send your language files to email@example.com or request commit permissions for the GitHub repository https://github.com/sos-berlin/joc-cockpit
- SOS will add your language files to the build process and will provide nightly builds for download.