ASP.NET Syntax ASP.NET Syntax for Web Controls
Creates a location on a Web page to display localized, static text.
Declarative Syntax
<asp:Localize
EnableTheming = "True | False"
EnableViewState = "True | False"
ID = "string"
Mode = "Transform | PassThrough | Encode"
OnDataBinding = "DataBinding event handler"
OnDisposed = "Disposed event handler"
OnInit = "Init event handler"
OnLoad = "Load event handler"
OnPreRender = "PreRender event handler"
OnUnload = "Unload event handler"
runat = "server"
SkinID = "string"
Text = "string"
Visible = "True | False"
/>
For information on the individual members of this class, see Localize in the class library.
The Localize control reserves a location on a Web Forms page to display localized text.
The Localize control is identical to the Literal control. Authors can programmatically control the text that is displayed in the Localize control by setting the Text property, which is inherited from the Literal control.
The following example demonstrates how to use the Localize control to localize a block of static text. Page resources in the App_LocalResource folder are used to customize the text for different languages.
<%@ Page Language = "C#"
Culture = "auto"
meta:resourcekey = "PageResource1"
UICulture = "auto" %>
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns = "http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Localize Example</title>
</head>
<body>
<form runat="server">
<div>
<asp:localize id="localize1" runat="server"
text = "hello world!"
meta:resourcekey = "localize1resource1" />
</div>
</form>
</body>
</html>
Localize Class Localize Web Server Control