Back to API Reference
Class

LanguageMatching

static

BCP 47 language tag matching helpers. Follows a simplified RFC 4647 "lookup" algorithm where a shorter tag is considered to match a longer tag sharing the same prefix (e.g. zh matches zh-Hans, and vice versa).

public static bool Matches()

Returns true if the two BCP 47 tags are equal or one is a prefix of the other.