Click here to Skip to main content
15,891,136 members
Articles / Web Development / ASP.NET

Globalization and localization demystified in ASP.NET 2.0

Rate me:
Please Sign up or sign in to vote.
4.87/5 (168 votes)
30 Sep 2006CPOL16 min read 750.5K   10.7K   281  
This article explains how to globalize an ASP.NET 2.0 website, step by step, with a practical example.
<%@ Page Language="C#" MasterPageFile="~/TestSiteMasterPage.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<asp:Content ID="Content2" ContentPlaceHolderID="cphTitle" Runat="Server">
Globalization and Localization Example</asp:Content>
<asp:Content ID="Content1" ContentPlaceHolderID="cphContent" Runat="Server">
    &nbsp; 
    <br />
    <br />
    <asp:Label ID="lblAmount" runat="server" Text="<%$ Resources:TestSiteResources, Total Amount is %>"></asp:Label>
    :&nbsp;
    <asp:TextBox ID="txtMoney" runat="server"></asp:TextBox>&nbsp;<br />
    <br />
    <asp:Label ID="lblCalendar" runat="server" Text="<%$ Resources:TestSiteResources, lblCalendar %>"
        Width="207px"></asp:Label><br />
    <br />
    
    <asp:Calendar ID="cldCalendar" runat="server" BackColor="White" BorderColor="White" Font-Names="Verdana" Font-Size="9pt"
        ForeColor="Black" Height="190px" Width="352px" BorderWidth="1px" NextPrevFormat="FullMonth">
        <SelectedDayStyle BackColor="#333399" ForeColor="White" />
        <TodayDayStyle BackColor="#CCCCCC" />
        <OtherMonthDayStyle ForeColor="#999999" />
        <NextPrevStyle VerticalAlign="Bottom" Font-Bold="True" Font-Size="8pt" ForeColor="#333333" />
        <DayHeaderStyle Font-Bold="True" Font-Size="8pt" />
        <TitleStyle BackColor="White" BorderColor="Black" Font-Bold="True" BorderWidth="4px" Font-Size="12pt" ForeColor="#333399" />
    </asp:Calendar>
</asp:Content>


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Founder Axero Solutions LLC
United States United States
Vivek is the co-founder of Communifire, a social business software platform that drives business growth. You can collaborate with anyone, provide better customer support, power your company intranet, build a knowledge base, and launch online communities for anything -- and more -- all in one integrated platform.

Link: http://axerosolutions.com

Comments and Discussions