Click or drag to resize
LocalizationHelperLocalizeExpression Method

Note: This API is now obsolete.

Localizes the given expression, handles two types of expressions: stringkey - Simple localization =default string|cs-cz=localized string - advanced localization

Namespace: CMS.Localization
Assembly: CMS.Globalization (in CMS.Globalization.dll) Version: 12.0.0
Syntax
C#
[ObsoleteAttribute("Use CMS.Helpers.ResHelper.LocalizeExpression instead.")]
public static string LocalizeExpression(
	string expression,
	string culture = null,
	bool encode = false,
	Func<string, string, bool, string> getStringMethod = null,
	bool useDefaultCulture = true
)

Parameters

expression
Type: SystemString
Expression to localize
culture (Optional)
Type: SystemString
Culture to use for localization
encode (Optional)
Type: SystemBoolean
If true, translations (replacements) are HTML encoded
getStringMethod (Optional)
Type: SystemFuncString, String, Boolean, String
Method to get the resource string for localization
useDefaultCulture (Optional)
Type: SystemBoolean
If true the default culture translation is used if translation in chosen culture doesn't exist

Return Value

Type: String
See Also