Monday, November 15, 2010

Internationalization and best practices to go for globalization vs. localization.


                             

                             Now a days every application clients wants to implement internationalization .Many people don't know what are the better practices for implementing globalization vs.localization .I have specified some of them apply according to your project requirement .you can find the basic tutorial in msdn here .

1.label's are heavy :                              Using label in every magic string will become very heavy .Because for every label ASP.NET engine needs to generate span tag.

Recommended  way : Literal control is best .Because it is light weight and will not generate any span tags.

2.Localization will cause slow response:

                         for every resource file asp.net engine compiles and  creates separate dll  in runtime.
      
Recommended way:Don't use too many local resources files .Instead of localization better to use globalization (wherever required )
 
3.Implicit Declaration vs. Explicit declaration

                         If you have value which is using more than one place then use Explicit declaration with Global resources .
 

4. Assembly vs. satellite Assembly

                             When you make a change to a default resource file, either local or global  ASP.NET recompiles the resources and restarts the ASP.NET application . This can affect the overall performance of your site. If you add satellite resource files,  it does not cause a recompilation of resources, but the ASP.NET application will restart.don't required any special mechanism.Just follow the naming standard's automatically in runtime CLR creates  satellite assembly .