Translations

Introduction

The Store app and the backoffice propose standard translations in different languages. On each application, the user can change the language displayed by clicking on his name and changing his settings.

OneStock also supports custom translations, to serve your precise company lingo, which can be managed from the backoffice.

Store app & Backoffice

Translation Page

To access the translation page, go to Configurations > Store App > Translations or Configurations > Backoffice > Translations. Once a change is saved, the new translation values take effect immediately in the store app (just need to refresh the store app). If you want to revert back to the default translations, simply click on the ⚙️ icon.

Accessing the Translation Page, applying custom translations, reverting a translation back to its default value.

Add a new translation key

In some cases, you need to add a translation that does not exist initially in the system. That may be the case when you define your own return reasons, stock dispositions, custom statuses in your workflows, etc.

Generally, the configuration page where you define new attributes will indicate that a new translation key must be added:

image-20240603-074605.png

This is represented by a globe on which you can click to see the translation key. You can then copy this key by clicking on the corresponding icon .

When you know the translation key you want to add, you can go in the backoffice on the following configuration page:

  • For a Store App translation: go to Configurations > Store App > Translations

  • For a Backoffice translation: go to Configurations > Backoffice > Translations

You can search for the key by entering it on the search field to check if it is already defined or not. If it already exists, you can click on it on the table to modify the corresponding translations.

If it doesn’t exist, click on the green button “Add a key” to add a translation.

It will show a popin where you can set:

  • the translation key you want to add,

  • the translations in different languages: give the names you want to be displayed on the backoffice screens for this stock disposition.

Then click on “Add” to validate the translations.

Translate any available languages

By default, only languages containing a custom translation are displayed in the page. To view and add custom translations in another language, click on the right menu and select a language from the list.

Filter translations

Available filters allow finding :

  • overloaded keys: only terms which have been changed on this page will be displayed.

  • not overloaded keys: only terms using the standard translation are displayed.

Detect keys missing a translation

You can easily spot keys that are not translated on every available language thanks to translation alerts.

Tips & tricks

Identifying translation key values

Store app

From the store app, open the inspector by pressing F12 and go to the Console tab. Run the toggleTranslation() command, refresh the page, and voila! Translation keys are displayed. To return to the translation values, run the toggleTranslation() command again and refresh the page.

Backoffice

From the backoffice, open the inspector by pressing F12 and go to the Console tab. Run the window.sessionStorage.setItem('DO NOT TRANSLATE', 'true') command, refresh the page, and voila! Translation keys are displayed. To return to the translation values, run the window.sessionStorage.setItem('DO NOT TRANSLATE', '') command again and refresh the page.