Localization
Localization - a module of the Websky system for managing language resources.
Contents
Purpose
The localization module in Websky is used:
- when an agency uses more than 1 language on a site to adapt the system to that language,
- to change the names of headers and control elements,
- For creating labels when using the AlphaInsurance module.
Working principle
All text units in the system (titles, buttons, links, inscriptions, drop-down lists, tooltips and other controls) have aliases - labels.
Label value (translation) is the name that serves as a designation of a text item on the site.
Labels are not visible to users on the page. They are in Latin characters and serve to uniquely determine the alias in the system. Each label has a name in Russian and correspondence in other languages. These correspondences are used for localization of the site into another language - the values of the aliases on the site page are changed into values in the selected language.
List of labels |
Label display |
Interface languages in Websky
Currently Websky supports translations of interface labels (design theme "wurst") into:
- English
- German,
- French,
- Italian,
- Romanian (air tickets),
- "Azerbaijani" (partially),
- Turkish (partially),
- Spanish (partially),
- Georgian.
Translations of the labels into following languages are in progress:
- Kazakh
- Kyrgyz,
- Tajik,
- Ukrainian.
If you need to translate the interface into a language other than those listed above, create a ticket in our project tracker, then technical support specialists will give you access to a special lang.mlsd account, where you can make the necessary values for the language labels. If you need to make edits to an existing language, contact technical support and tell them what needs to be fixed. Minor edits can be done independently under /settings_language.
Searching for and editing labels
Localization is set up in the Site Administration → Language Resources section.
For the agency manager, aliases are enabled on the site page through debugging mode.
The manager can edit agency site labels. It is forbidden to edit control panel labels.
There are two ways to search for tags for viewing and editing:
- by filters,
- by name or by label value (translation).
Search by Filter
To search for labels by filter:
- Select the language of the labels you are searching for.
- Select the component or module of the system that contains the labels you are looking for in the Component field.
- Select the system component's (module's) program file that contains the labels you are looking for.
As a result of the search, the list of variables corresponding to the search request is displayed in the form of a table with columns:
- label - name of the alias,
- lang - value of the label in the selected language.
Filter search |
To search for a list of labels with a missing translation in a specific language, select also:
- language for matching.
- matching form:
- full - output all aliases,
- with empty - output of aliases, which have a label in at least one of the selected languages with an empty value,
- with the same - output aliases with the same value in both languages,
- with blank - the output of aliases which have no values in at least one of the languages.
Then the search result with matching is displayed in 3 columns:
- alias - the name of the alias,
- Search language code - the value of the label in the search language,
- Matching language code - the value of the label in the matching language.
Filter search with matching |
To sort the output results, click on the header of the column you want to sort by.
Changing the translation of the label
To change the label translation:
- Click on the alias value.
- Correct the value.
- Click the Change button at the bottom of the page.
Search by value
A value search is used for a quick search.
- Specify the name or value (translation) of the tag in the Search field.
- Click the Search button.
- To search for the exact word or phrase, enable the Exact Match option.
Labels with a matching name are searched throughout the system regardless of the values of the Service and File fields.
Search by value |
The result is a table with the following columns:
- Service - service within which the label is found.
- Localization - language of the label's value.
- 'File - file inside which the label was found.
- Alias - label's name.
- Value - label's value for the specified location.
- Link - link to the table for editing the alias.
To sort the output results, click on the header of the column you want to sort by.
The Reset button clears the search results.
Changing the translation of the label
To change the alias translation
- Select the line with the desired localization
- Click on the Link field.
A table opens with the label and lang columns where the alias is displayed:
Table for editing alias |
The Show All button displays all aliases by the file to which the selected label belongs.
Usage of HTML in translations
To insert a link to external sources, use html code in the tag value, but the quotation marks must be escaped with a backslash. Example:
<a href=\"URL\" target=\'blank\'>Click me</a>
Usage of HTML in translations |
For example, a label with a value:
Rules format are described in <a href='http://support.nemo.travel/ru/Pricing_2.0:_specification'> documentation</a>
Is displayed as a link on the page, like this:
Rules format are described in documentation
Exporting language labels
The site also has functionality that allows you to export all language tags in JSON or PHP formats. To use it, just click on the "export" button, after which a new tab will open, where you can view, copy and export labels in your chosen format.
Debugging mode
Debug mode is available for the agency manager if the CMS is deployed on the site.
To display labels instead of their translations on the page enable the Enable debugging mode option in the upper left corner of the page.
To return label translations, turn off debugging mode. The aliases are replaced by their translations in the language corresponding to the selected site location.
Translation of payment gateway names
Translation of the payment gateway names: Payment methods in Websky.