I like the globalisation feature of .NET v2.0. That is a very easy to use feature to produce World ready applications. Here are the steps to use this feature:

  1. Add a resource file under App_GlobalResources with a culture name identifier explained here. If the default resource file name is Resource.resx which is for English; a Turkish resource file would be Resource.tr.resx.
  2. Enter strings that you would like to use in those resource files.
  3. Turn on the UICulture="Auto" of the aspx page in the @Page directive.
  4. Access to resx file through Resources class in the code behind like Resources.Resource.<name of the resource>

When the page is loaded it checks the culture of the client and loads the proper resource class. I think, it is doing this with a proxy class like in the proxy pattern. It is good that you don't have to do the necessary plumbing to get the culture from client and load proper resource file.

Part of "A Feature a Day" Series.

Advertisement


Comments for this entry:

No comments posted yet.

Enter your comment here

Comments are moderated

*


*


 (not displayed)


 (will be a link on your name)

*
Bold Italic Underline Blockquote Hyperlink Hyperlink

 

Please add 8 and 6 and type the answer here:

Comment Preview:

 

Search



About me

Hi, my name is Gurkan Yeniceri. I am a software engineer with 8 years of experience in both public and private sectors. I have been generally writing about software engineering and Microsoft technologies since March 2005 on this site.
View Gurkan Yeniceri's profile on LinkedIn

Contact

If you would like to contact with me you can use the contact page here. I will try to respond it in a timely manner (I will try my best). You can also contact with me via Microsoft Live Messenger with the address gyeniceri {AT} hotmail {DOT} com.
If you are one of my Turkish readers, you may want to visit my Turkish blog here.

If you would like to read my site with an RSS reader like RSS Bandit, you may want to use to subscribe.

RSS 2.0

Advertisement


Bookmark this site

del.icio.us digg NewsVine YahooMyWeb Reddit Spurl TailRank BlinkList Furl Shadows blogmarks
    www.flickr.com
    This is a Flickr badge showing public photos from gurkanyeniceri. Make your own badge here.
    There are 133 posts and 88 comments on this site. Other sites also linked it 7 times.

    Advertisement