The title of an application appears in the application list and on the application Tile when the user pins the application to the Start screen. Localizing the application title is optional. Some developers may want to not localize the application title for branding reasons.
To localize the application title that is displayed in the application list or application Tile, you must create a resource-only DLL for each display language that your application targets. For a full list of display languages that Windows Phone supports, see Culture and Language Support for Windows Phone. The resource-only DLL should contain only the resource strings used to localize the application title in the application list and on the application Tile.
The following screenshots show where an application title is used in the context of an application list and an application Tile.
The title in the application list: |
The title on the application Tile pinned to the Start screen: |
---|---|
![]() |
![]() |
To complete these procedures, you need a Windows Phone application project. You can use an existing project, or you can create an empty Silverlight Windows Phone application to use to test these procedures. For more information about creating a new project, see How to: Create Your First Silverlight Application for Windows Phone.
The following sections walk you through the process of localizing the application title for use in the application list and application Tile.
In this procedure, you create a project to generate a resource-only DLL named AppResLib.dll.
![]() |
---|
There is more than one way to organize your Windows Phone application and resource DLL projects and files for localization. The method presented here is a simple method that works well for all editions of Visual Studio. |
To create a language resource DLL project
-
On the File menu, point to New and then click Project.
The New Project dialog appears.
-
In the left pane, click Installed Templates, expand Visual C++ and then click Win32.
-
In the list of project types, click Win32 Project.
-
In the Name box, type AppResLib.
-
In the Location box, enter a location for your project.
Note:
For the purposes of this procedure, you can create the AppResLib project anywhere.
-
Click OK.
The Win32 Application Wizard appears.
-
In the left pane, click Application Settings.
-
Under Application type, select DLL.
-
Under Additional options, select Empty project.
-
Click Finish.
The new DLL project is created and opens in Visual Studio.
-
In Solution Explorer, select the new DLL project.
-
On the Project menu, click Properties.
The Property Pages dialog appears.
-
In the left pane, 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.
-
Save and build the project.
In this procedure, you add a resource string table to the DLL project that contains the language-neutral name of your application.
To create the language-neutral resource strings for your application
-
In Solution Explorer, select the new DLL project.
-
On the Project menu, click Add Resource.
The Add Resource dialog appears.
-
In the Resource type list, 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
The language-neutral name of your application to be displayed in the application list.
AppTileString
200
The language-neutral name of your application to be displayed in the application Tile when pinned to Start.
-
Save and build the DLL project.
-
In Windows Explorer, locate the file AppResLib.dll that you just built.
-
Copy the file AppResLib.dll to the directory that contains your Windows Phone application project file.
Tip:
If you are using the default Windows Phone project structure, this is the same directory that contains the file App.xaml.
In this procedure, you edit the resource string table to contain specific language names. You rename the DLL file, and copy it to the appropriate location.
To create the first specific language resource strings for your application
-
Edit the resource strings, setting the properties as follows.
ID
Value
Caption
AppTitle
100
The English (United States) name of your application to be displayed in the application list.
AppTileString
200
The English (United States) name of your application to be displayed in the application Tile when pinned to Start.
-
Save and build the DLL project.
-
In Windows Explorer, locate the file AppResLib.dll that you just built.
-
Rename the DLL file to AppResLib.dll.0409.mui.
-
Copy the file AppResLib.dll.0409.mui to the directory that contains your Windows Phone application project file.
Tip:
You can use a post-build event to rename and move the file. Copy the following string into the Project Properties, under Configuration Properties, Build Events, Post-Build Events: copy "$[OutputPath]$[DLLProjectName].dll" "$[WindowsPhoneApplicationPath]\AppResLib.dll.0409.mui"
To create additional language resource strings for your application
-
Repeat the previous procedure, renaming the DLL files using the information in the following table. Each DLL file name has the format AppResLib.dll.[locale ID].mui.
Note:
For a full list of which display languages are supported on which version of Windows Phone, see Culture and Language Support for Windows Phone.
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
Italian (Italy)
it-IT
AppResLib.dll.0410.mui
Japanese (Japan)
ja-JP
AppResLib.dll.0411.mui
Korean (Korea)
ko-KR
AppResLib.dll.0412.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
Caution:
Don’t forget to copy the MUI files to the directory that contains your Windows Phone application project file.
To use the localized resource strings in your Windows Phone application
-
In Solution Explorer, select your Windows Phone application project.
-
On the Project menu, click Add Existing Item.
The Add Existing Item dialog appears.
-
Select the AppResLib.dll file and all the AppResLib.dll.*.mui files, and then click Add.
The files are added to your Windows Phone application project.
-
In Solution Explorer, select the imported DLL files, and in the Properties window, set the Build Action properties to Content.
-
In Solution Explorer, expand Properties and then double-click WMAppManifest.xml.
-
Modify the WMAppManifest.xml file to use the AppTitle resource string from the satellite DLLs for the application title used in the application list. The code is highlighted in the following:
-
Modify the WMAppManifest.xml file to use the AppTileString resource string from the satellite DLLs for the application title used in the application Tile. The code is highlighted in the following:
-
Save and build the Windows Phone application.
To test your localized application title, follow the steps listed at How to: Test a Localized Application for Windows Phone.
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述