v1.6 Quick Code supports translation out of the box.
The following languages are included in the downloaded bundle:
- English (Default)
Translation messages are combined in a single
.json file. Keys represent the English message, and values represent the same message in the target language.
An example from Portuguese translation file:
"Saves contact details on the smartphone": "Salva detalhes de contato no smartphone"
Same pattern are used across all language files.
Translation files are used to translate the text used in menus, buttons and hard coded text. To translate blog posts, FAQs and home page text you will have to edit the text found in
/dashboard/blog-posts/ and in
Add new translation
If your language is not included by default, you can add it by the following steps:
Click on Create button.
Enter language name and locale.
Click on save.
Click on download default translation file link.
.jsonvalues in your language.
Make sure to never modify the keys, even if you find multiple whitespaces. If any key is modified, the translation file will be rejected by the system.
An example to fill json values would be:
// Default translation key, value pair.
"Saves contact details on the smartphone": ""
// Translate only the value and never touch the keys
"Saves contact details on the smartphone": "Here goes the message translated into your language"
Once all keys are translated into your language, you can upload the file to Translation file field.
After upload completes, click on Close.
In translation list page, and next to your newly added translation, click on Activate
The translation file should be complete before activation. Incomplete translations cannot be activated.
Edit a translation that is already included with the package
Login to the backend using your admin credentials.
From the left sidebar, under Content group, click on Translations.
Next to the translation you want to edit, click on edit link.
.jsonfile found under Translation file field.
Edit the file values as desired.
Click on the
xnext to the Translation file to delete the old translation file.
Upload your edited file.
Save & Close the form.
Auto translate with Google Translation
To enable auto translation with Google, you will have to edit the
.env found in the root directory of the project - and add your Google API Key as following:
Once it is enabled, you will be able to translate your system to a new language with a single click.