Karrot is available in different languages. So, instead of adding English text directly to a component's source file, we add a key instead. This key points to a text in each of the locale files.
All locale files can be found under
For example the Spanish locale file is located at
<ChangePhoto ... :label="Group logo" :hint="Click to upload your group logo!" ... />
<ChangePhoto ... :label="$t('GROUP.LOGO')" :hint="$t('GROUP.SET_LOGO')" ... />
- Add a new key-value pair to
- As a convention keys are CAPITALIZED.
- Keys can be nested for better structure.
- Do not add the key to the other locale-*.json files. They will be added automatically by the CI tool after merge to master and translated by transifex.
TODO hey stranger, do you know how to add new locales? Improve this documentation by answering this question.