This is a mirror of official site: http://jasper-net.blogspot.com/

Steps for internationalizing your application: Globalization and Localization

| Thursday, March 11, 2010
Today I am going to show on how we can internationalize the an asp.net application. I have gone through some scenarios and error and they have been discussed as well. Moreover, I have also described about Satellite assembly versioning facts.

Here it goes:

  1. Open the Microsoft Visual Studio 2008(Recommended VS2008 SP1).
  2. Open a new web application project in your preferred language. I am using C#.
  3. In the solution explorer, you will see default.aspx page and if we expand “Show all files”, we will see “Default.aspx.cx” and a designer file (Default.aspx.designer.cx) as well.
  4. Add a App_GlobalResources ASP.Net Folder by right clicking on the “Project” and click on Add.
  5. This will add App_GlobalResources folder to the Project/Solution.
  6. Now, here we have to be cautious on what we add.
  7. Lets add a new item to the App_GlobalResources.
  8. Right click on the App_GlobalResources folder, it should automatically reflect “Resource1.resx”file.
  9. Change the file name to a general name, say “Strings.resx” or “Localization.resx”
 10. I will keep the name of the resource as “Strings”.
 11. This will add a new resource to the App_GlobalResources folder.
 12. NOTE: It is necessary to have a default resource file . Without the default resource file(in my case it is “Strings.aspx”) it is going to throw following error.

Server Error in '/' Application.

Could not load file or assembly 'App_GlobalResources' or one of its dependencies. The system cannot find the file specified.

Read more: Navigate till the end

Posted via email from jasper22's posterous

0 comments: