Language Aliasing System

The Language Aliasing System (LAS) provides a means to translate a text string in one language into the appropriate value in one or more languages. An alias is assumed name, or a given name for an object that is different than the registered, proper, or "real" name. A rose is a rose, and may smell just as sweet whatever you call it, but in Italian a rose is "una rosa", in German it is eine rose, in Dutch een roos, and so forth. Language aliases let you switch your display between any language using the substitution you define for each.

GENESIS64 uses two types of aliases:

Since different cultures use different units of measurement, the language aliasing system uses two different mechanisms to provide aliasing:

Language Aliasing Architecture

Language aliases are stored in the central global database (Microsoft SQL Server or Microsoft SQL Server Express) and those aliases can be accessed over the network by clients allowing you to reduce the amount of work even further. With language aliases you can use a generic display to view the data from many different tags. When you install GENESIS64 the installer creates a LAS server database. You may want to or need to create and configure your own GAS databases when as you create global aliases.

 

Language aliases and the related concept of themes save you a lot of time and effort, but require that you put a little time and thought into organizing your alias schemes so that it makes sense to your users. Without language aliases the amount of work required to build sophisticated multi-lingual HMI displays would be so large that they would be entirely impractical. That makes language aliases a central concept and practice that you can use again and again in your work.

 

To provide a reasonable performance, the local clients do not connect directly to the database (Local Aliasing Engine Server or LAS), but communicate with a Language Aliasing Client ( GAC), which will obtain the requested information and cache it locally. The figure below shows the Language Aliasing System architecture.

 

Note. For examples of how Language Aliasing is used in GraphWorX64 displays, see the example file in the GenDemo : LAS_Example.GDFX.

 

Language Aliasing System Architecture

The language aliasing sytem architecture

 

Notice the central role that the FrameWorX server plays in making global aliases function correctly. If you find that your language aliases do not resolve, or you are missing connections to the data sources required to resolve your global aliases you should make sure the FrameWorX server is functioning correctly and the service is running.

Translations

The figures below show a sample GraphWorX64 display in two different languages (taken from GenDemo). The left hand screen is in English; and when you click one of the flags the pick action for that button changes the GENESIS64 localization (current language/culture) setting. The screen changes to the translated value stored in the language alias database for that alias in that particular language. Shown on the right is the same screen in the Czech language.

 

A GraphWorX64 LAS Display, First in English, Then in Czech, at Runtime

   

 

Language aliases for the displays above are entered into GraphWorX64 as data points in a process point object. GENESIS64 recognizes that the data point being evaluated is an alias because it is formatted using a special set of delimiters in the form:

 

/+"String to be translated."+/

 

The opening delimiter is /+; while the closing delimiter in +/. The delimiters are recognized by the language alias system engine as enclosing a language alias, and then that alias as you have defined it in the LAS configurator returns the value that you have defined in the alias for the language.

 

Translations are straightforward. They perform the language conversion function illustrated below:

 

Translation Operations Performed at Runtime

 

Shown below is the GraphWorX64 display used to create the two screens above in configuration mode. The title line "Language Support Example" is the selected object in the display. The red oval in the  GraphWorX64 property sheet shows the assignment of the header data object (a process point) as having a Data Source property of /+Title+/; Title being the language alias you defined. This is the essence of how the GENESIS64 LAS performs translation.

 

The GraphWorX64 GENDemo Display with Defined Language Aliases in Configuration Mode.

Configuration

When you install GENESIS64 it automatically installs a SQL server database to support LAS as it does all of the other engines contained in GENESIS64 . Configuration and setup of the SQL server database is performed in the same manner in each instance. You create a new database for LAS using the SQL Server Wizard, alter the properties of the default database, or use another database that has been defined for the LAS system.

 

Note. There is one distinction between the SQL server database in GAS versus the one used in LAS. In GAS the changes you make in the database must have their configuration applied before being saved to the GAS. In LAS the changes are propagated to clients immediately.

 

The Language Alias system is configured inside the classic Workbench, as shown in the figure below.

 

An Alias Defined in the Language Alias Server within Workbench

 

To learn move about language translations, read the topic Alias Translation.

Conversion

One example of a conversion would be currency. If you define a conversion of Dollars to Euros, then the first step defines the unit bindings FromDollars and the alternative FromEuros. Each of these bindings contains a table with the different languages such that FromDollars would list the manner in which languages and cultures perform the conversion, or the way in which your display handles the conversion for each language.

 

You define Unit Conversion and Unit Binding objects in the LAS configurator. Unit Bindings contain a list of Languages and Locales based on the ISO standard that Windows uses. The list is populated with 9 languages/locales, but you can add or remove any of the more than 100 localizations that are available, as described in the topic Language Support. Each language defines the function needed to perform the conversion.

 

The functions that perform the conversion are unit conversions objects. One unit conversion FromDollars-ToEuros(gr) might perform the value conversion at the current conversion rate, and would then group the numbers using the delimiter associated with the current Windows localization and then round the amount off to a number with no decimal places (e.g. 1,000,000 Euros). A different conversion function FromDollars-ToEuros(u2) might give you no groupings and two decimal places (e.g. 1000000.00 Euros). You also have control over the units of measure, which can be prefixes or suffix, a text sting, or an alias that you define. Unit conversions can be constructed in the Language Conversions tab of the Data Browser or entered into the READ and WRITE expressions directly.

 

The figure below illustrates the steps performed at runtime for a language conversion:

 

Language Conversion Steps

 

To construct the expression used as the language conversion, you can use the Data Browser Language Conversion tab to construct the expression. The Data Browser ensures that the expression is syntactically correct. The path describes the location of the alias in the alias tree, traversing the alias groups) to locate the specific alias. Alias Groups, and the analogous UnitBinding Groups and UnitConversion Groups perform a function similar to folders in a directory structure. With the unit binding located and the language lookup for the unit conversion function determined, the LAS performs the conversion it finds in the UnitConversion object and handles both the data value conversion and the units of measure translation.

 

You can read more on language conversions in Language Alias Conversions.

 

See Also:

Language Support

Language Alias Translation

Language Alias Database