User's preferred language

An application can get the user's preferred language and territory as configured on the front-end platform.

The user preferred language can, for example, be useful in selecting appropriate content based on language preferences, and in starting other programs by setting the expected application locale.

To get the user preferred language, perform a standard.feInfo front call with the userPreferredLang option:
PRIVATE DEFINE fe_lang STRING

FUNCTION get_fe_lang()
  IF fe_lang IS NULL THEN
     CALL ui.Interface.frontCall( "standard", "feInfo", ["userPreferredLang"], [fe_lang] )
  END IF
  RETURN fe_lang
END FUNCTION

For Genero Desktop Client and mobile front-ends, the front-end locale is defined by the operating system.

For Genero Browser Client, the front-end locale is defined in the web browser preferences.

The format of the returned value is:
language_territory
For example, when running the GDC front-end on a Linux® platform with LC_ALL defined as en_US.utf8, the front call will return:
en_US