LanguageExtensionMethods

public static class LanguageExtensionMethods
Utility class for language and language family and language region logic.

Properties

LinguisticFamilies

#
Enumerate over all linguistic families.
public static IEnumerable<(LanguageFamily family, bool primary)> LinguisticFamilies { get; }

LinguisticRegions

#
Enumerate over all linguistic geographic regions.
public static IEnumerable<(LanguageRegion primary, LanguageRegion secondary)> LinguisticRegions { get; }

Methods

FindFamily

#Example
Find the family which contains the given language.
public static LanguageFamily FindFamily(
this Language
language
)

FindRegion

#Example
Find the family which contains the given language.
public static (LanguageRegion primary, LanguageRegion secondary) FindRegion(
this Language
language
)
Create the CultureInfo object associated with the specified language. Note: there is no culture information for the ordinal language.
public static CultureInfo Info(
this Language
language
)

Languages

#Example
Enumerate over all languages which belong to a specific family.
public static IEnumerable<Language> Languages(
family
)

Languages

#Example
Enumerate over all languages which belong to a specific region.
public static IEnumerable<Language> Languages(
region
)

StringComparison

#Example
Compare two strings using the language rules.
public static int StringComparison(
this Language
language,
Language rules.
a,
First text.
b,
Second text.
options = CompareOptions.None
Options for comparison.
)
Comparison key.

StringEquality

#Example
Test two strings for equality using the language rules.
public static bool StringEquality(
this Language
language,
Language rules.
a,
First text.
b,
Second text.
options = CompareOptions.None
Options for equality.
)
True if strings are equal.

StringLength

#Example
Measure the number of final characters in a string. This method will count combining characters as one.
public static int StringLength(
this Language
language,
text
)

StringLowercase

#Example
Lower case a string.
public static string StringLowercase(
this Language
language,
text
)

StringOrdering

#Example
Create a sorting map for an array of strings.
public static Maths.IndexMap StringOrdering(
this Language
language,
Language rules.
keys,
String keys to sort. This array will not be modified.
options = CompareOptions.None
Comparison options to use during sorting.
)
Sorting map.

StringUppercase

#Example
Upper case a string.
public static string StringUppercase(
this Language
language,
text
)

ToFlag

#Example
Gets the flag icon associated with a particular language. Not every language has a flag, either because it doesn't represent a nation state, or because it overlaps several states with competing flags.
public static IIcon ToFlag(
this Language
language
)

ToString

#Example
Create a string descriptor of this language.
public static string ToString(
this Language
language,
includeDetails
If true, the LCID and native name will be included.
)