To translate Tackle UI into a new language you only need to create a new file public/locales/{myLanguageCode}/translation.json
. Where myLanguageCode
can be any ISO 639-1
code value.
Steps:
- Clone this repository.
- Locate your terminal in the cloned repository and execute:
npm install
- Edit the file
i18next-parser.config.js
and add your new language code to the arraylocales
. E.g.
locales: ["en", "es", "myLanguageCode"]
- Generate the folder and files for the new language:
npm extract
The previous command created a file public/locales/{myLanguageCode}/translation.json
; the content of this file should be the translated new language. As a reference you can use the english version of the translation located at public/locales/en/translation.json
As soon as you feel confident, open a new Pull Request with your changes and make it part of the official repository.
To see your changes in action you will need to start Tackle UI in development mode. For starting Tackle UI in development mode follow the instruction at Development section
Steps:
- Start Tackle UI in dev mode following the instructions in the Development section.
- Go to Keycloak http://localhost:8180/auth/admin/ and use
username=admin, password=admin
. Go toRealm settings > themes > Supported locales
and select the new language you are adding. Finally click onSave
. - Go to http://localhost:3000/ and you should be redirected to the Login page where you are able to select your new language.
At this point you should be able to see your new language already translated into the language you selected in the Login phase.
Remember that since you are in dev mode any change you do to the folder
public/locales
should be automatically loaded in your browser.
To accommodate diverse user needs, including internationalization, our custom assessment module supports the uploading of YAML files. This flexibility allows for the easy adaptation of assessments to different languages or specific requirements. If you're looking to offer assessments in a new language, simply create and upload a YAML file tailored to that language.