Preparing an Application for Localization
The next step is to switch on localization support for your project. This takes just one
change??”you need to add the following element to the .vbproj file for your project anywhere
in the first
element:
en-US
This tells the compiler that the default culture for your application is U.S. English (obviously,
you could choose something else if that??™s appropriate). Once you make this change, the
build process changes. The next time you compile your application, you??™ll end up with a subfolder
named en-US. Inside that folder is a satellite assembly with the same name as your
application and the extension .resources.dll (for example, LocalizableApplication.resources.dll).
This assembly contains all the compiled BAML resources for your application, which were previously
stored in your main application assembly.
UNDERSTANDING CULTURES
Technically, you don??™t localize an application for a specific language but for a culture, which takes into
account regional variation. Cultures are identified by two identifiers separated by a hyphen. The first portion
identifies the language. The second portion identifies the country. Thus, fr-CA is French as spoken in Canada,
while fr-FR represents French in France. For a full list of culture names and their two-part identifiers, refer to
the System.
Pages:
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593