We localize the Application Title in WindowsPhone applications: a guide to reduce hemorrhoids

Good day! Many here have developed applications that fall into the public Marketplace, AppStore, or some other repository. Many of these applications are useful to users around the world. And so that the application is not only not useful, but also a little more attractive, it would be nice to give it a name and description in the native language of the potential user. WindowsPhone Marketplace copes with the task of localizing descriptions with a bang. However, the localization of Application Title delivers ... some inconvenience.

In order for the application to have a multilingual AppTitle, Microsoft official documentation offers many lettersrather big resource dll extraction tutorial for each of the required languages. The main sadness of this tutorial: you must have something to create a VisualC ++ library and a lot of extra body movements.

However, there is a way to reduce hemorrhoids by more than half - a small utility called WP7Localizer, which can be found here .

The main goal of this thing is to supply the necessary resource dll. A nice addition for the lazy - you can set titles only in English, the translation into other languages ​​will be tightened by the Bing Translator.

Now let's try to get a small WindowsPhone application with AppTitle in three languages: Russian, English and French.

Stage 1

Create a new WindowsPhone application project, call it TestApp. And immediately we’re crawling some editor (for example, Notepad) into the file TestApp.csproj. This is the XML configuration file of the application assembly, in which we are interested in the SupportedCultures node. Add our supported languages ​​to it:

	ru-RU,en-US,fr-FR


Stage 2

Generate a resource dll for our multilingual Application Title. Let's do this by scoring on a manual from Microsoft, and using WP7TitleLocalizer:


(I cut off the picture in order to leave the essence, and not a bunch of empty fields)

By clicking on the “Save DLLs” button, we get a bunch of resource files - they are created even if for some languages ​​we did not fill anything. Of all this diversity, we need 4 files:
  • AppResLib.dll - actually the library itself
  • AppResLib.dll.0409.mui - resource for English
  • AppResLib.dll.0419.mui - a resource for the Russian language
  • AppResLib.dll.040C.mui - resource for the French language

See the MSDN documentation for more information on language codes .

Stage 3

We connect our language resources to the project. For this:
  1. First, create localization resources. Details of this step go beyond the topic and are in the official How-To . I can only say that for simplicity we will not create separate folders for them - we will store them directly in the root folder of the project.
  2. Copy our 4 generated files to the project folder
  3. In Visual Studio, add our freshly copied resources to the project (right-click on the project in Solution Explorer -> Add Existing Item)
  4. For the newly added files, set the Build Action property in Content (in the Solution Explorer, select our files and change the properties in the Properties tab)
  5. Editing the application manifest. Open the WMAppManifest.xml file and look for the Title property in the App node. Now about the following happens there:



    Change the Title to @ AppResLib.dll, -100. We do not put a space after the decimal point, otherwise the value is recognized as a string and this obscure entry will be visible in the Marketplace. We get:



    Now we look at the PrimaryToken node - it has a child node Title, which also needs easy shamanism. We set the value of AppResLib.dll, -200.

    
        ...
        @AppResLib.dll,-200

  6. Putting the application together


Stage 4

Well, what did we do? The result is given in the screenshots.
Here's what we see on the phone’s menu when changing the language used:



Here’s what we see in the Dashboard marketplace:



This is how you can get a little closer to the user so that he can smile and enjoy. All success!

Also popular now: