Skip to main content

Language Helper

This object is passed into every code execution containing the following methods:

Methods

GetIso1Code

Description: Retrieves the ISO 639-1 code for the provided language.

Signature: string GetIso1Code(string language)

Parameters:

  • language (string): The language.

Returns:

  • (string): The ISO 639-1 code for the language.

GetIso2Code

Description: Retrieves the ISO 639-2 code for the provided language.

Signature: string GetIso2Code(string language)

Parameters:

  • language (string): The language.

Returns:

  • (string): The ISO 639-2 code for the language.

GetEnglishFor

Description: Converts the provided language code to its English name.

Signature: string GetEnglishFor(string language)

Parameters:

  • languageCode (string): The language to convert.

Returns:

  • (string): The English name of the language.

AreSame

Description: Checks if two strings represent the same language.

Signature: bool AreSame(string language1, string language2)

Parameters:

  • language1 (string): The first language to compare.
  • language2 (string): The second language to compare.

Returns:

  • (bool): true if the languages represent the same language, otherwise false.