Soluling home   Document home

Windows Phone Localization and Internationalization

Windows Phone Localization and Internationalization

Deprecated. Use as it is, but we do not give support or develop the format anymore.

Windows Phone (Wikipedia) is platform for mobile phones.

Localization Process

Windows Phone uses .NET but unlike deskptop .NET applications Windows Phone applications are deployed as Silverlight applications using XAP files. This document shows you the localization issues that are different to the general .NET application localization process.

Visual Editors, Emulator and Screen shots

Soluling contains native visual editors for Windows Forms and WPF. Using the editors translators can see real time how the translated user interface looks like. This is not possible for Windows Phone. You have two options. One is to use Windows Phone emulators. If the emulator is installed on your computer Soluling cn use it. Once you have translated an user interface run the localized application on the emulator to see if it looks right. If you want to give visual information about the page you can add a screen shot. Soluling can automatically take a screenshot from a running emulator and add the shot to the node. To take a shot, start Windows Phone emulator (if it is not already running), select the node in the project tree, right click and choose Take Screenshot.

Windows Phone project

Signing

 

Signing

Localization Tutorial

Best way to get familiar into Widows Phone localization is by an sample. <data-dir>\Samples\WindowsPhone\Driving contains a simple Windows Phone sample that suit well for the first tutorial. Open <data-dir>\Samples\WindowsPhone\Samples.sln solution file into Visual Studio 2010 or 2012. Our first sample is called Driving.

Tree

Double click MainPage.xaml. Visual Studio opens the page editor.

IDE

The page contains a few text and image elements. Text element are Text attributes in MainPage.xaml. Because Soluling can localize XAML you can have properties values stored into XAML. Image elements are image files that have beede added as resources. Make sure that all the images you use have Build Action set to Resource. This gets the images compiled into as resources inside the assembly file.

Actions

If you press Start Debugging button Visual Studio builds the project, starts the emulator, uploads the application into the emulator, and finally starts the application.

Emulator

Now when our application is ready and running we can start localizing it. Start Soluling and click New from File button. Project Wizard appears. It is used to select the file, properties, languages and to finally create a new project. Select <data-dir>\Samples\WindowsPhone\Driving\Bin\Debug\Driving.xap.

XAP

Accept the file by clicking Next. Resources sheet appears. It lets you select the resource types you want to localize. Uncheck Version and XML resource. Keep ResX, XAML and Image resources checked.

Resources

Accept the resources by clicking Next. Languages sheet appears. It lets you select the original language of your application and the target languages. Drag German from Available languages to Project languages.

Languages

Accept languages by clicking Finish. Soluling creates a new project.

Project

We don't want to localize application icon, background and splash screen images. Exclude them. Select ApplicationIcon.png, right click and choose Excluded. Repleat this for Background.png and SplashScreenImage.jpg. Soluling ask for a rescan. Click Yes. Save to project by clicking Save project into file button on the left upper corner. Now the project is ready for translation.

Projects

Normally there is no need to translate images but in this case English flag reprecents English language. This is why we need to "translate" it to German flag. Right click empty flag cell in German column and choose Load Translation. Browse to <data-dir>\Samples\Common\48x48, select flag_germany.png and click Open. Soluling ask if you want to link the image file into the project. This means that if the image file changes Soluling will automatically load new image into the project.

Message

Link car_green_sedan.png as a German translation of the car image.

Translated project

Select Date application

SelectDate application is simple but uses localization specific features such as string resources, 3rd party controls, and signing. The sample uses Silverlight for Windows Phone Toolkit control library that is a free library made together by Microsoft and independent programmers. You can download it from http://silverlight.codeplex.com/.

Sign

Samples

Deprecated. Use as it is, but we do not give support or develop the format anymore.

<data-dir>\Samples\WindowsPhone contains following Windows Phone samples:

Directory Description Notes
Driving A sample that shows how to localize a Windows Phone application. Try this first!
Font A sample that shows how to localize fonts and how to use maximum translation length.  
Plural A sample that shows how to use plural messages.  
Toolkit A sample that shows how to localize applications using 3rd party controls.  

Samples.sln is a Visual Studio 2010 solution file that contains all the above samples. All samples are written in Visual Studio 2010. If you use Visual Studio 2012 you can just open the solution and let Visual Studio to upgrade it.

Configuring Windows Phone Localization

You can configure how to localize your Windows Phone application by selecting the item in the project tree, right-clicking, and choosing the Options menu. A source dialog appears that lets you edit the options. This source uses the following option sheets.