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

How to localize The Title in a WP7 Silverlight application

| Tuesday, November 2, 2010
If you’re working on a Silverlight application for WP7 and you want to localize non only the resources  inside the application, but also the Title name of your application you could find some useful information on this post that make your app easily uploaded and certified on the App Hub (the marketplace).

The result of you localization process will be as the following, in the emulator (you can test this on it) you’ll see the same app using different names for English, Italian, French, Spanish and German.

How to localize

Basically to localize the Title you have to create a resource-only project for the following languages in C++, build and add the assemblies to the root of you Silverlight project. To do this you have to use Visual C++ compiler (unfortunately the Visual C++ Express can’t be used, but if haven’t  a full copy of Visual Studio 2010 you can download a trial).

I’ve create a simple Silverlight project and the resource-only C++ projects that you can download and easily personalize.

You can see in following picture how it looks like:

2313.image_5F00_thumb_5F00_4.png

The WP7SilverlightLocalizedSample depends on some C++ projects. You hadn’t to rename the C++, projects, they must be named exactly as they are, instead you can add you personal Silverlight project to the Solution.

Every C++ project have some post-built rules that copy the resource assemblies in the root of the solution. In the Silverlight project I have “add a link” to the generated assemblies and I’ve set the properties for these seven files as “Content” in the Build Actions.

If you now want to localize the names of your application in different languages, first start from the AppResLib, and right-click on the AppResLib.rc file , than view code, and you’ll enter in the resource file.

The AppResLib is the assembly for the language-neutral.

Read more: Pietro Brambati Blog

Posted via email from .NET Info

0 comments: