TLanguage

Identifies some language.

Constructor

Format:

explicit TLanguage (const std::wstring &_LanguageName,
  const std::wstring &_LocaleName);
					
function MakeLanguage(_LanguageName : WideString; 
  _Locale : WideString) : TLanguage;
					

Language is passed in one of the below forms:

You may use TMiscFunctions::StringToLanguage to convert the strings like "Portuguese(pt-BR)" or "French" to TLanguage.

LanguageName

The language name, for example: "French".

Format:

std::wstring LanguageName;
				
LanguageName: WideString;
				

LocaleName

The locale name, for example: "pt-BR". Can be left unset.

Format:

std::wstring LocaleName;
				
LocaleName: WideString;
				

IsOnlyLanguage

Returns true if the language is defined only by the name, without the locale.

Format:

bool IsOnlyLanguage() const;
				
function IsOnlyLanguage(const Language: TLanguage) : Boolean;
				

ToString

Represents TLanguage as string. To convert such a string back, use TMiscFunctions::StringToLanguage.

Format:

std::wstring ToString() const;
				
function ToString(const Language: TLanguage) : WideString; overload;
				

AtLeastWeakEquality

Return the equality of the two TLanguages by at least one language targeting component: LanguageName or LocaleName. For the strict compare by both components, use the regular compare operator (operator == in C++).

Format:

bool AtLeastWeakEquality (const TLanguage &Other) const;
				
function AtLeastWeakEquality(const Language, Other: TLanguage) : Boolean;