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

Class UserControlBaseLegacyExtensions

Contains extension methods for legacy functionality of UserControlBase that is no longer accessible on the class.

Inheritance
System.Object
UserControlBaseLegacyExtensions
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
Assembly: EPiServer.dll
Version: 9.12.2
Syntax
public static class UserControlBaseLegacyExtensions

Methods

Translate(UserControlBase, String)

Translate the given string to the current language.

Declaration
[Obsolete("Use EPiServer.Framework.Localization.LocalizationService.GetString(String) to get Translate support.")]
public static string Translate(this UserControlBase userControlBase, string key)
Parameters
Type Name Description
UserControlBase userControlBase

The user control.

System.String key

A string to translate

Returns
Type Description
System.String

The translated string.

Remarks

GetStringByCulture(String, CultureInfo) for more information on the format of the string to translate.

TranslateForScript(UserControlBase, String)

Translate the given string to the current language, in a script-safe format.

Declaration
[Obsolete("Use EPiServer.Framework.Localization.LocalizationService.GetString(String) and ScriptResourceHelper.PrepareResourceForScript(String) to get TranslateForScript support.")]
public static string TranslateForScript(this UserControlBase userControlBase, string key)
Parameters
Type Name Description
UserControlBase userControlBase

The user control.

System.String key

A string to translate

Returns
Type Description
System.String

The translated string.

Remarks

GetStringByCulture(String, CultureInfo) for more information on the format of the string to translate.