The resource generation tool creates an entry for every property that is marked with the attribute in the control. You must add any further culture-specific resources manually by copying the generated resources and giving them the appropriate name (for example, ) then translate the values.
Visual Studio automatically generates the default resources for the controls of the page only. The resources are always prefixed with the name of the control and postfixed with the name of the property. Visual Studio generates resources for several properties of each control. Visual Studio then generates a resource file in the App_LocalResources folder, which includes the values for every control of the page currently open in design view
How to build Multi-Language Web Sites with ASP.NET 2.0 and Visual Studio.Net 2005:įor localizing a page, just select Tools > Generate Local Resources. Also you can use another specific culture like using Switzerland German culture this way:. You can use general English or general German or general Arabic like this:ĭ.resx, .resx and .resx. Not here that we are using United States English, German's Gemran, and Egyptian's Arabic. Your page name is default.aspx., you have 3 resource files as mentioned earlier, each one resource file should be named as:ĭ, and. If the culture portion in the name is not specified, the resources defined in the resource file are used as default resources. The second part of the name defines the culture. With that said, every set of resources has to define a base name that is specified through the first part of the name of the resource file. The CLR defines a behavior for finding culture-specific resources. If you have a web form with name default.aspx and your web site support English, German and Arabic, then you should have 3 resource files for each culture. More specifically, each Web Form -Page- in your web site should have a resources for every culture -language- it should support. Usually resources are created for every culture the application should support. Net Framework 2.0 in general and in ASP.Net 2.0 specifically become much more easier and brings fun during localization process. This article assumes that you already know how to build web forms and to use controls and validation controls. Here we will explore the necessary details for working with resources in ASP.NET applications and for creating international ASP.NET applications based on embedded resources and the integrated localization support. These classes are located in the System.Resources and System.Globalization namespaces.
NET Framework come with several classes for managing and accessing resources in applications.
The CLR and the base class library of the. Basically, the CLR supports a mechanism for packaging and deploying resources with any type of application. NET Framework 2.0 as well as 1.x comes with an integrated infrastructure for creating international applications. In order to reach international markets through the Internet, supporting different cultures through our applications is essential for being successful.