Skip to content

Translation

Starting from v1.6 Quick Code supports translation out of the box.

The following languages are included in the downloaded bundle:

  • Turkish
  • Swedish
  • Vietnamese
  • Italian
  • Hindi
  • German
  • French
  • Spanish
  • Portuguese
  • English (Default)

Background

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.

Note

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 /dashboard/content-blocks.

Add new translation

If your language is not included by default, you can add it by the following steps:

  • Open your-quick-code-installation/dashboard/translations

  • Click on Create button.

  • Enter language name and locale.

  • Click on save.

  • Click on download default translation file link.

  • Fill all .json values in your language.

Warning

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.

Help

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

Note

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.

  • Download the .json file found under Translation file field.

  • Edit the file values as desired.

  • Click on the x next 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:

GOOGLE_API_KEY=your-api-key-goes-here

Success

Once it is enabled, you will be able to translate your system to a new language with a single click.