Page History
...
- When starting JOC Cockpit a temporary directory is created with the
temp
folder: - Within the temporary directory hierarchy find language files in the following folder structure:
Language File Development
Adding new Language Files
- Open the
translationlocales.js
file to find a single function array to which you can add a new language by specifying country code, language code, country name and name.language name like this:{
"en": {
"lang": "en",
"country": "US",
"name": "English"
},
"fr": {
"lang": "fr",
"country": "FR",
"name": "French"
},
"de": {
"lang": "de",
"country": "DE",
"name": "German"
},
"ja": {
"lang": "ja",
"country": "JA",
"name": "Japanese"
}
}
- Create a new general language files file - preferably by starting from a copy of the English general language file - for
en.json
and the naming convention<language code>.json
.- 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.json
and the naming conventionjson-editor-text_<language code>.json
.- Translate assignments for each line of the editor language file.
Editing Files
- 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 visible from 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.
Development Cycle
- 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 files file in a folder outside of the JOC Cockpit installation.
- Start the JOC Cockpit service/daemon.
- Copy the modified version of your language file files and of the
translationslocales.js
filejson
file to the target folder as indicated with the above chapter. - Log in to JOC Cockpit and optionally modify your user profile to use the newly added language. Any new language added to
translationslocales.js
shouldjson
should become available with your profile. - Test your changes to the language filefiles.
- Any modifications to the language file files are not immediately considered but require a restart of JOC Cockpit as in step 2).
...
- For integration with our builds please send your language files to sales@sos-berlin.com or request commit permissions for the github 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.
...
Overview
Content Tools