Okapi .NET Library

Routines.AreSameLanguages Method 

 [This is preliminary documentation and subject to change.]

Compares two language codes.

[Visual Basic]
Shared Public Function AreSameLanguages( _ 
   ByVal p_sLanguage1 As String, _ 
   ByVal p_sLanguage2 As String, _ 
   ByVal p_bIgnoreSubLanguage As Boolean _ 
) As Boolean
[C#]
public static bool AreSameLanguages(
   string p_sLanguage1,
   string p_sLanguage2,
   bool p_bIgnoreSubLanguage
);
[C++]
public: static bool AreSameLanguages(
   String* p_sLanguage1,
   String* p_sLanguage2,
   bool p_bIgnoreSubLanguage
);
[JScript]
public static function AreSameLanguages(
   String p_sLanguage1,
   String p_sLanguage2,
   bool p_bIgnoreSubLanguage
): bool;

Parameters

p_sLanguage1
First language code to compare.
p_sLanguage2
Second language code to compare.
p_bIgnoreSubLanguage
Indicator whether sub-language parts should be ignore (if set: "en", "en-ca" and "en-us" are the same).

Return Value

True if the two language codes are the same accoring the processing rules.

See Also

Routines Class | Okapi.Library.Base Namespace