Control functions

Data types

The CONTROL programming language uses the following data types for supporting the multilingual functionality:

  • langString

  • dyn_langString

  • dyn_dyn_langString

For these data types, the following operators are supported:

= == != []

The index operator starts at 0 for the langString type and at 1 for the dyn* data types. The index operator can only be used for read access. Therefore, the content of a langString cannot be changed by using the operator. Using the index operator for a variable of type langstring, returns a variable of the type string. Use the function setLangString() to change the contents of a variable of the type langString. When a langString variable is assigned to a string variable, then the entry in the current language of the langString is assigned to the string variable.

The index starts at 0 for the langString data type (contrary to dyn_* data types for which the index starts at 1).

Example

The following example sets texts for three different languages and outputs the texts. The setLangString function is being used.

main()
{
  langString ls;
  setLangString(ls,getLangIdx("de_AT.utf8"),"German text");
  setLangString(ls,getLangIdx("en_US.utf8"),"English text");
  setLangString(ls,getLangIdx("ru_RU.utf8"),"Russian text");
  DebugN("Texts in different languages:", ls);
}

Control functions

The following table lists the available functions for multilingualism: