Class CultureInfoExtensions
Extension methods to localize the name of CultureInfos.
Inheritance
System.Object
CultureInfoExtensions
Namespace: EPiServer.Framework.Localization
Assembly: EPiServer.Framework.dll
Version: 12.0.3Syntax
public static class CultureInfoExtensions : Object
Methods
Translate(CultureInfo)
Translates the specified culture info name using Current.
Declaration
public static string Translate(this CultureInfo cultureInfo)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | cultureInfo | The culture info. |
Returns
Type | Description |
---|---|
System.String | The translated name otherwise the native name. |
Translate(CultureInfo, LocalizationService)
Translates the specified culture info name using the specified localizationService
.
Declaration
public static string Translate(this CultureInfo cultureInfo, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | cultureInfo | The culture info. |
LocalizationService | localizationService | The localization service. |
Returns
Type | Description |
---|---|
System.String | The translated name otherwise the native name. |
TranslateCultureName(String)
Translates the specified culture name using Current.
Declaration
public static string TranslateCultureName(this string cultureName)
Parameters
Type | Name | Description |
---|---|---|
System.String | cultureName | Name of the culture. |
Returns
Type | Description |
---|---|
System.String |
TranslateCultureName(String, LocalizationService)
Translates the specified culture name using the specified localizationService
.
Declaration
public static string TranslateCultureName(this string cultureName, LocalizationService localizationService)
Parameters
Type | Name | Description |
---|---|---|
System.String | cultureName | Name of the culture. |
LocalizationService | localizationService | The localization service. |
Returns
Type | Description |
---|---|
System.String | The translated name otherwise the native name. |