Difference between revisions of "Localization"

From docs.websky.tech
Jump to navigation Jump to search
m
m (Usage of HTML in translations)
Line 161: Line 161:
 
  Rules format are described in <a href='http://support.nemo.travel/ru/Pricing_2.0:_specification'> documentation</a>
 
  Rules format are described in <a href='http://support.nemo.travel/ru/Pricing_2.0:_specification'> documentation</a>
  
{| class="wikitable"
+
Is displayed as a link on the page.
|-
 
|[[File:Localization_8.png|500px]]
 
|}
 
Is displayed as a link on the page:
 
{| class="wikitable"
 
|-
 
|[[File:Localization_9.png|300px]]
 
|}
 
  
 
===Exporting language labels===
 
===Exporting language labels===

Revision as of 15:45, 23 December 2020

Localization - a module of the Websky system for managing language resources.

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.

Localization 1.png
List of labels
Localization 2.png
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:

  1. Select the language of the labels you are searching for.
  2. Select the component or module of the system that contains the labels you are looking for in the Component field.
  3. 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.
Localization 3.png
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.
Localization 4.png
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:

  1. Click on the alias value.
  2. Correct the value.
  3. Click the Change button at the bottom of the page.

Search by value

A value search is used for a quick search.

  1. Specify the name or value (translation) of the tag in the Search field.
  2. Click the Search button.
  3. 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.

Localization 5.png
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

  1. Select the line with the desired localization
  2. Click on the Link field.
    A table opens with the label and lang columns where the alias is displayed:
Localization 6.png
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>
Localization 7.png
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.

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.

Localization 10.png

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 debug mode option in the upper left corner of the page.

1000px
Debugging mode

To return label translations, turn off debugging mode. The aliases are replaced by their translations in the language corresponding to the selected site location.

1000px
Translations of labels in Russian
1000px
Translation of the labels in English

Translation of payment gateway names

800px
Payment gateway names


Translation of the payment gateway names: Payment methods in Websky.


See also