Table of Contents

Class LocaleHelperLang

Namespace
SunamoLang
Assembly
SunamoLang.dll

Helper class for locale operations, converting between language and country codes.

public class LocaleHelperLang : ILocaleHelper
Inheritance
LocaleHelperLang
Implements
Inherited Members
Extension Methods

Methods

GetCountryForLang2(string)

Gets the country code for the specified language.

public string GetCountryForLang2(string lang)

Parameters

lang string

The language code (e.g., "cs", "en").

Returns

string

The country code (e.g., "CZ", "GB").

GetLangForCountry(string)

Gets the language code for the specified country by querying all available cultures.

public static string? GetLangForCountry(string country)

Parameters

country string

The country code (e.g., "cz", "gb").

Returns

string

The language code (e.g., "cs", "en"), or null if not found.

GetLangForCountry2(string)

Gets the language code for the specified country.

public string? GetLangForCountry2(string country)

Parameters

country string

The country code (e.g., "CZ", "GB").

Returns

string

The language code (e.g., "cs", "en"), or null if not found.