How to localize an app title for Windows Phone 8
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
The title of an app can be localized based on the Windows Phone 8 supported culture and languages. The app title appears in both the app list and on the app Tile as shown below. Both of these locations are outside of the app itself. Localizing the app title is optional. Some developers won’t want to localize the app title for branding reasons.
To localize the app title that is displayed in the app list or app Tile, you must create a resource-only DLL, as well as separate Multilingual User Interface (MUI) files for each display language that your app targets. For a full list of display languages that Windows Phone supports, see Culture and language support for Windows Phone. The resource-only DLL must contain the language-neutral (default language) resource strings for the app title and Tile title supported by your app. Each MUI file needs to include the resource strings used to localize the app title in the app list and on the Tile.
The following screen shots show where a title is used in the context of an app list and an app Tile.
The title in the app list: |
The title on the app Tile pinned to the Start screen: |
---|---|
This topic contains the following sections.
- Prerequisites
- Downloading the language-neutral resource project
- Creating a language-neutral resource DLL using Visual Studio
- Creating language resource strings for your app
- Using the localized resource strings in your Windows Phone app
- Testing the localized title
- Related Topics
Prerequisites
Before you start, make sure that you have the following software installed on your computer:
- Visual Studio or Microsoft Visual Studio Express 2012 for Windows Phone. The .NET Framework is installed automatically.
To complete the procedures in this topic, you need a Windows Phone project. You can use an existing project, or you can create an empty Windows Phone project to use for testing these procedures. For more info about creating a project, see How to create your first app for Windows Phone 8.
Downloading the language-neutral resource project
As an alternative to creating a language-neutral resource project by using Visual Studio, you can download the language-neutral resource project. This project can be modified in Visual Studio Express 2012 for Windows Phone or Visual Studio.
Download: Language-Neutral Resource Project
Creating a language-neutral resource DLL using Visual Studio
In this set of procedures, you use Visual Studio to create a language resource DLL project, create language-neutral resource strings, and update the DLL project to create the resource DLL. Later, you use this DLL project to create more localized resources.
Important Note: |
---|
Microsoft Visual Studio Express 2012 for Windows Phone doesn’t support the creation of language resource DLL projects. You must use Visual Studio to add language-neutral resource strings to a project and to create a resource DLL. If you don’t have Visual Studio, you can download the language-neutral resource project that you can modify using Visual Studio Express 2012 for Windows Phone. See the Downloading the language-neutral resource project section for download details. |
Each resource contains the localized strings that are displayed as the app title and as the app Tile title. Visual Studio allows you to create a project that can be used to create a language-neutral resource DLL. If you don’t have Visual Studio, you can download a prebuilt language resource DLL project and use Visual Studio Express 2012 for Windows Phone to modify the project and create resource DLLs and MUI files.
Creating a language resource DLL project
Before you create language-neutral resource strings for the app title, you must create a DLL project using Visual Studio.
To create a language resource DLL project
On the File menu, select New Project.
The New Project dialog box appears.
In the left pane, expand Installed, expand Templates, expand Visual C++, and then click Win32.
In the list of project types, click Win32 Project.
In the Name box, type AppResLib.
Click OK.
The Win32 Application Wizard appears.
Click Next.
Under Application type, select DLL.
Under Additional options, select Empty project.
Also under Additional options, clear the Security Development Lifecycle (SDL) checks check box.
Click Finish.
The new DLL project is created and opens in Visual Studio.
On the Build menu, select Build Solution.
Creating language-neutral resource strings
In Visual Studio, you add a resource string table to the DLL project that contains the language-neutral name of your app. The language-neutral resource strings are used as the default strings for your Windows Phone app. Also, these resource strings will be used as the template for your localized app title strings.
To create the language-neutral resource strings for your app
In Solution Explorer, select the DLL project named AppResLib.
On the Project menu, click Add Resource.
The Add Resource dialog box appears.
In the Resource type list of the Add Resource dialog box, select String Table, and then click New.
The resource string table opens.
Create two resource strings with the following properties.
ID |
Value |
Caption |
---|---|---|
AppTitle |
100 |
Lang-Neutral App Title |
AppTileTitle |
200 |
Lang-Neutral Tile Title |
Updating the DLL project
In Visual Studio, you must update the AppResLib DLL project so that it is built as a resource-only DLL.
To update the DLL project
On the Standard toolbar, choose Release from the Solution Configurations list box.
In Solution Explorer, right-click the AppResLib DLL project and then click Properties.
The Property Pages dialog box appears.
In the left pane of the Property Pages dialog box, expand Configuration Properties, expand Linker, and then click Advanced.
Select the No Entry Point property, click the drop-down arrow to the right of the property value, and then click Yes (/NOENTRY).
Note
/NOENTRY prevents the linker from linking a reference to _main into the DLL; this option is required to create a resource-only DLL.
Click OK.
On the Build menu, select Build Solution.
In Solution Explorer, right-click the solution (Solution 'AppResLib') and then click Open Folder in File Explorer.
File Explorer displays the project files.
In File Explorer, open the Release folder, and locate the AppResLib.dll file that you built.
Note
The project folder and the solution folder both contain a Release folder. The AppResLib.dll file is contained in the Release folder at the root of the solution.
Rename the file AppResLib.dll file to AppResLibLangNeutral.dll.
Later, you use this file in your localized Windows Phone app.
Creating language resource strings for your app
In this set of procedures, you use Visual Studio or Visual Studio Express 2012 for Windows Phone to edit the language-neutral resource string table to contain localized resource title strings. Then, you rebuild the DLL that contains the new localized title strings and rename the DLL file.
Creating the first specific language resource strings
In this procedure, you create localized title strings for English (United States). You must use the existing DLL project that you either created with Visual Studio in the previous set of procedures (see Creating a language-neutral resource DLL using Visual Studio), or downloaded (see Downloading the language-neutral resource project).
To create the first specific language resource strings for your app
Open the DLL project in Visual Studio or Visual Studio Express 2012 for Windows Phone if it’s not already open.
In Solution Explorer, expand the Resource Files folder.
Right-click the AppResLib.rc resource and then click View Code.
Modify the AppResLib.rc file by changing the resource string values as follows:
ID |
Value |
---|---|
AppTitle |
enus App Title |
AppTileTitle |
enus Tile Title |
On the Build menu, select Build Solution.
In Solution Explorer, right-click Solution 'AppResLib' and then click Open Folder in File Explorer.
File Explorer displays the project files.
In File Explorer, open the Release folder, and locate the latest AppResLib.dll file that you built.
Note
The project folder and the solution folder both contain a Release folder. The AppResLib.dll file is contained in the Release folder at the root of the solution. The solution folder is easy to recognize because it contains the AppResLib.sln solution file.
- Rename the file AppResLib.dll file to AppResLib.dll.0409.mui.
The DLL file that you created and renamed contains the English (en-US) app title and the app Tile title. Later, you use this file in your Windows Phone app. Your Windows Phone app recognizes this file based on the 0409 LCID value that represents English (enus).
Creating additional language resource strings
You can create more language resource strings and the DLL that contains those resources by following the preceding procedure. For each localized set of resource strings, you create a new DLL and rename it with the LCID and .mui extension.
To create additional language resource strings for your app
- Repeat the preceding procedure, however, you must provide a localized AppTitle string value and AppTileTitle string value for each locale. You must also rename the DLL file using the info in the following table for each locale. Each DLL file name has the format AppResLib.dll.[locale ID].mui.
Note
For a full list of supported display languages based on Windows Phone version, see Culture and language support for Windows Phone.
**Windows Phone 8 supported display languages**
Culture name |
Culture code |
DLL file name |
---|---|---|
Albanian (Albania) |
sq-AL |
AppResLib.dll.041c.mui |
Arabic |
ar-SA |
AppResLib.dll.0401.mui |
Azerbaijani (Latin) |
az-Latn-AZ |
AppResLib.dll.042c.mui |
Belarusian |
be-BY |
AppResLib.dll.0423.mui |
Bulgarian |
bg-BG |
AppResLib.dll.0402.mui |
Catalan |
ca-ES |
AppResLib.dll.0403.mui |
Chinese Simplified (PRC) |
zh-CN |
AppResLib.dll.0804.mui |
Chinese Traditional (Taiwan) |
zh-TW |
AppResLib.dll.0404.mui |
Croatian |
hr-HR |
AppResLib.dll.041a.mui |
Czech (Czech Republic) |
cs-CZ |
AppResLib.dll.0405.mui |
Danish (Denmark) |
da-DK |
AppResLib.dll.0406.mui |
Dutch (Netherlands) |
nl-NL |
AppResLib.dll.0413.mui |
English (United Kingdom) |
en-GB |
AppResLib.dll.0809.mui |
English (United States) |
en-US |
AppResLib.dll.0409.mui |
Estonian |
et-EE |
AppResLib.dll.0425.mui |
Filipino |
fil-PH |
AppResLib.dll.0464.mui |
Finnish (Finland) |
fi-FI |
AppResLib.dll.040b.mui |
French (France) |
fr-FR |
AppResLib.dll.040c.mui |
German (Germany) |
de-DE |
AppResLib.dll.0407.mui |
Greek (Greece) |
el-GR |
AppResLib.dll.0408.mui |
Hebrew |
he-IL |
AppResLib.dll.040d.mui |
Hindi |
hi-IN |
AppResLib.dll.0439.mui |
Hungarian (Hungary) |
hu-HU |
AppResLib.dll.040e.mui |
Indonesian (Indonesia) |
id-ID |
AppResLib.dll.0421.mui |
Italian (Italy) |
it-IT |
AppResLib.dll.0410.mui |
Japanese (Japan) |
ja-JP |
AppResLib.dll.0411.mui |
Kazakh |
kk-KZ |
AppResLib.dll.043f.mui |
Korean (Korea) |
ko-KR |
AppResLib.dll.0412.mui |
Latvian |
lv-LV |
AppResLib.dll.0426.mui |
Lithuanian |
lt-LT |
AppResLib.dll.0427.mui |
Macedonian |
mk-MK |
AppResLib.dll.042f.mui |
Malay (Malaysia) |
ms-MY |
AppResLib.dll.043e.mui |
Norwegian (Norway) |
nb-NO |
AppResLib.dll.0414.mui |
Persian |
fa-IR |
AppResLib.dll.0429.mui |
Polish (Poland) |
pl-PL |
AppResLib.dll.0415.mui |
Portuguese (Brazil) |
pt-BR |
AppResLib.dll.0416.mui |
Portuguese (Portugal) |
pt-PT |
AppResLib.dll.0816.mui |
Romanian |
ro-RO |
AppResLib.dll.0418.mui |
Russian (Russia) |
ru-RU |
AppResLib.dll.0419.mui |
Serbian (Latin) |
sr-Latn-CS |
AppResLib.dll.081a.mui |
Slovak |
sk-SK |
AppResLib.dll.041b.mui |
Slovenian |
sl-SI |
AppResLib.dll.0424.mui |
Spanish (Mexico) |
es-MX |
AppResLib.dll.080a.mui |
Spanish (Spain) |
es-ES |
AppResLib.dll.0c0a.mui |
Swedish (Sweden) |
sv-SE |
AppResLib.dll.041d.mui |
Thai |
th-TH |
AppResLib.dll.041e.mui |
Turkish |
tr-TR |
AppResLib.dll.041f.mui |
Ukrainian |
uk-UA |
AppResLib.dll.0422.mui |
Uzbek (Latin) |
uz-Latn-UZ |
AppResLib.dll.0443.mui |
Vietnamese |
vi-VN |
AppResLib.dll. 42a.mui |
Culture name |
Culture code |
DLL file name |
---|---|---|
Chinese Simplified (PRC) |
zh-CN |
AppResLib.dll.0804.mui |
Chinese Traditional (Taiwan) |
zh-TW |
AppResLib.dll.0404.mui |
Czech (Czech Republic) |
cs-CZ |
AppResLib.dll.0405.mui |
Danish (Denmark) |
da-DK |
AppResLib.dll.0406.mui |
Dutch (Netherlands) |
nl-NL |
AppResLib.dll.0413.mui |
English (United Kingdom) |
en-GB |
AppResLib.dll.0809.mui |
English (United States) |
en-US |
AppResLib.dll.0409.mui |
Finnish (Finland) |
fi-FI |
AppResLib.dll.040b.mui |
French (France) |
fr-FR |
AppResLib.dll.040c.mui |
German (Germany) |
de-DE |
AppResLib.dll.0407.mui |
Greek (Greece) |
el-GR |
AppResLib.dll.0408.mui |
Hungarian (Hungary) |
hu-HU |
AppResLib.dll.040e.mui |
Indonesian (Indonesia) |
id-ID |
AppResLib.dll.0421.mui |
Italian (Italy) |
it-IT |
AppResLib.dll.0410.mui |
Japanese (Japan) |
ja-JP |
AppResLib.dll.0411.mui |
Korean (Korea) |
ko-KR |
AppResLib.dll.0412.mui |
Malay (Malaysia) |
ms-MY |
AppResLib.dll.043e.mui |
Norwegian (Norway) |
nb-NO |
AppResLib.dll.0414.mui |
Polish (Poland) |
pl-PL |
AppResLib.dll.0415.mui |
Portuguese (Brazil) |
pt-BR |
AppResLib.dll.0416.mui |
Portuguese (Portugal) |
pt-PT |
AppResLib.dll.0816.mui |
Russian (Russia) |
ru-RU |
AppResLib.dll.0419.mui |
Spanish (Spain) |
es-ES |
AppResLib.dll.0c0a.mui |
Swedish (Sweden) |
sv-SE |
AppResLib.dll.041d.mui |
In the next procedure, you copy the MUI files and language-neutral DLL file to the root directory of your Windows Phone app.
Using the localized resource strings in your Windows Phone app
By adding the localized MUI files and the language-neutral DLL file to your Windows Phone app, app users see the localized app title and the localized app Tile title based on the selected Windows Phone language that they choose for their Windows Phone.
To use the localized resource strings in your Windows Phone app
Open your existing Windows Phone 8 app or create a Windows Phone 8 app in either Visual Studio or Visual Studio Express 2012 for Windows Phone.
In Solution Explorer, select your Windows Phone 8 project.
On the Project menu, click Add, and then click Existing Item.
The Add Existing Item dialog box appears.
Find and select the AppResLibLangNeutral.dll file and all the AppResLib.dll.*.mui files that you created in the previous procedures, and then click Add.
The files are added to the root your Windows Phone project.
In Solution Explorer, right-click the AppResLibLangNeutral.dll file and rename it to the following:
AppResLib.dll
In Solution Explorer, select the imported files (AppResLib.dll and AppResLib.dll.*.mui).
In the Properties window, set the Build Action property to Content.
Note
If the Properties window is not displayed, select Properties Window from the View menu.
In Solution Explorer, move the AppResLib.dll.*.mui files into the Resources folder.
In Solution Explorer, expand Properties and then open the WMAppManifest.xml file.
The Windows Phone app manifest designer is displayed.
Select the Application UI tab if it’s not already selected.
Set the Display Name to the following:
@AppResLib.dll,-100
Set the Tile Title to the following:
@AppResLib.dll,-200
Save and build the Windows Phone app.
The Windows Phone 8 app displays the localized app title and the app Tile title based on the language and country settings of the user's Windows Phone 8 phone. The AppTitle string and AppTileTitle string contained in the .mui files correspond to the language and country setting of the user's Windows Phone 8 phone. If you don’t include a matching .mui file for a specific supported locale, your Windows Phone 8 app uses the language-neutral AppTitle string and AppTileTitle string contained in the AppResLib.dll file.
Testing the localized title
To test your localized app title, follow the steps listed at How to test a localized app for Windows Phone 8.