LocaleΒΆ

Introduction

The term locale means the set of display settings of a user interface based on language and country. It is represented by a label called locale ID, made up of language and country (e.g., en-US, en-UK, it-IT etc.).

A project can support multiple locales. The locales supported by the project are set in the Locales property of the project node.

In multilingual projects, the Presentation engine displays the interface based on the session locale, if configured, and the texts displayed based on the translations available in the LocalizationDictionary object (see Translation editor).

Locale IDs

The Locale ID specifies a language and a country, e.g. en-US, en-UK, it-IT. In particular, the second segment determines the date and time format, the date separator and the measurement system (International Measurement System, United States Customary System or British Imperial System).

Session locale

The session locale determines the locale of the user interface (i.e. the translation of the texts according to the project settings (see Translation editor)), the data display format, and the conversion of all values according to the required measurement system. It is set at runtime based on the user or object locale UI Session Session UI.

Note

if there are no locale settings at the user or Session UI object level, the session locale is set based on the locales supported by the project: in particular, the first locale in order of writing in the Locales property has priority (see Fallback locale).

Fallback locale

If the user-determined session locale is not configured in a project, or if translations of some interface texts are not available for the session locale, the texts are displayed in the project fallback locales, configured in the Fallback locales for translations property of the project node.

Note

when there are multiple fallback locales, at runtime the system uses the fallback locale based on the order of insertion of the different locales in the Fallback locales for translations property. If the list of fallback locales contains the locale not supported by the project, this fallback locale takes priority over the others.

User locale

The user locale is personal data used at runtime to set the session locale. It is set in the LocaleIds property of the objects User User.

Through C#, using the APIs that return nodes (see Access to project nodes), it is possible to set multiple locales for the same user, i.e. alternative locales if the Q Application does not support the main locale. The order in which the user locales are shown determines their priority for setting the session locale.

When the session locale is set automatically at runtime based on the user locale, if none of the user locales are configured in the Q Application, the session locale is set based on the project fallback locales.

Locale through Session UI

The UI Session Session UI object is useful for managing the session locale in multilingual projects for which there is no information on the user locale, and therefore the user is asked to choose the locale at runtime. For the configuration, see Configure the selection of the locale at runtime through the Session UI object.

Customized combinations of language and measurement systems

The traditional locales determine the measurement system based on the country indicated in the locale ID. In any case, through the Session UI and User objects, it is possible to associate a measurement system of your choice with a language supported by the project. For example, it is possible to select Italian (it-IT) as the display language, but the US system of measurement (United States Customary System), which also determines the data display format.

Customized measurement systems

At runtime, UNIQO displays the data relating to the physical quantities in the measurement system required by the session locale.

In any case, it is possible to display the physical quantities in units of measurement other than the standard units of the reference metric system, or create customized units of measurement. To do this, see Customize the measurement systems.

See also

Related concepts

Sessions and locale

Related procedures

Set the locale

Related APIs

Session activity log and audit

References

UI Session

User

SessionType