November Happy Hour will be moved to Thursday December 5th.

Class CultureInfoExtensions

Extension methods to localize the name of CultureInfos.

Inheritance
System.Object
CultureInfoExtensions
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: EPiServer.Framework.Localization
Assembly: EPiServer.Framework.dll
Version: 10.10.4
Syntax
public static class CultureInfoExtensions

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.