Localization | Unosquare passcorepro
By manuelsantos - 8/5/2019
In this day and age, it's important to deliver an app that can display it's contents in several languages. When developing passcore-pro, our goal was to create a tool that not only can help anyone around the globe, but also give our clients control to a very deep level.
With the use of i18n library for React, we are able to show our users passcore-pro in any language. However, how is this achieved? Below we show a little tutorial in how passcore-pro can be displayed in any language you want.
Adding a new language.
The same way administrators are responsible in which information is displayed to the user, they're also responsible in the localization settings that passcore-pro can display data. As a default, the app comes in two languages: U.S English and Spanish. Nevertheless, admin users can add or delete any language they have created, except the ones that come by default.
To create a new language, follow the steps below:
- Go to Dashboard/Web Application/Languages
- Press the button 'Add data' and select 'Add language'. Fill up the form with a key and a language display name. Below are a couple of examples:
- EN | English
- ES | Español
- FR | Francais
Once the new language is created, the languages grid will add a new column for your language, so now the user must edit the values for each translation flag.
Working on the existing translations.
Add new translation flags.
If you need an identifier and it doesn't exist, you can add it in the Languages module of your web application. When you create a new identifier, you must provide values for each language on the grid.
Edit existing translations.
Sometimes, an identifier may contain a mistranslation value, a mistake or simply be empty, so in those cases, the admin can edit the values for every language. NOTE: If an identifier includes an underscore ("_"), it CANNOT BE DELETED, as this marks it as a required identifier.
Any language you like.
With passcore-pro, you can add any language you like to present the data depending on your necessities. You can add languages and identifiers depending of what you and your staff need. All this was achieved using the i18n library.