LanguageCodeHelper Class
Namespace: PTS.Globalization
Assembly: PTS.Globalization.dll
Syntax
public static class LanguageCodeHelper
Inheritance
System.Object
LanguageCodeHelper
Methods
FromIsoCode(String, Boolean)
Declaration
public static LanguageCode FromIsoCode(string isoCode, bool require = true)
Parameters
Type | Name | Description |
---|---|---|
System.String | isoCode | |
System.Boolean | require |
Returns
Type | Description |
---|---|
LanguageCode |
IsoCode(LanguageCode)
Gets the ISO 639-1 two-letter code for the language
Declaration
public static string IsoCode(this LanguageCode code)
Parameters
Type | Name | Description |
---|---|---|
LanguageCode | code |
Returns
Type | Description |
---|---|
System.String | The ISO 639-1 two-letter code for the language |
Name(LanguageCode)
Declaration
public static string Name(this LanguageCode code)
Parameters
Type | Name | Description |
---|---|---|
LanguageCode | code |
Returns
Type | Description |
---|---|
System.String |
NativeName(LanguageCode)
Gets the language name in its native language and alphabet
Declaration
public static string NativeName(this LanguageCode code)
Parameters
Type | Name | Description |
---|---|---|
LanguageCode | code |
Returns
Type | Description |
---|---|
System.String | The language name in its native language and alphabet |
ToCulture(LanguageCode, Boolean)
Declaration
public static CultureInfo ToCulture(this LanguageCode code, bool require = true)
Parameters
Type | Name | Description |
---|---|---|
LanguageCode | code | |
System.Boolean | require |
Returns
Type | Description |
---|---|
System.Globalization.CultureInfo |
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()