Windows Phone - Multi-language application name

Windows Phone - Multi-language application name


In writing When the papers, did not pay attention to the application name in the program list and

Application Tile multi-language, resulting in this time of submittal is back pieces, therefore, the article that is left out of this one part add up,

Let handle multiple languages ​​more complete.

> Listing Application Tile with a range of multi-language :

     IC452713(Application list) IC452714(the Application Tile)

The above two images, respectively, in addition to the application content, the appearance of a multi-language portion to be processed. But unfortunately handling of language here,

Unlike Android can be defined directly in Strings.xml, specify a @AppName through AndroidManifest.xml so convenient.

Thus, according to the MSDN And from the manner described under practice:

1. Build multi-language necessary Dll () :

    . a use Visual Studio 2010 to build a C ++ project and select Win32 project, named: AppResLib ;

         000

     . B Application Type set and related information through the Win32 Application Wizard;

          001

          Select the application type: DLL ; other options are: empty project ;

          00

     . c Solution Explorer project through the gear selection by right property, enter the properties window, the specified value is shown in the illustration below: Yes (/ NOENTRY) ;

         01      

         [注意] /NOENTRY prevents the linker from linking a reference to _main into the DLL;

                       this option is required to create a resource-only DLL.

   

    d. 透过Solution Explorer在项目档按右键建立一个新的资源,选择为:String Table类型,输入下方二个重要的参数;

         0402

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.

          如下图示:

          03

    e. 进行该项目AppResLib的建置,产生AppResLib.dll。

2. 利用步骤一建置好的多语系Dll,根据需要语系建立成特定的语言包(mui)

     步骤一建立好的Dll是Windows Phone运行时主要引用的Dll,接着搭配想要支持的语言,进行语言包的建立。

语言包,指的是Windows Phone在设定中“地区+语言”中的“显示语言”, 根据MSDN上针对不同语系有对应

语言包的命名方式,可参考

往下列出常见的语系:

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
English (United States) en-US AppResLib.dll.0409.mui

以下介绍建立二个语系:en-US(AppResLib.dll.0409.mui)与zh-TW(AppResLib.dll.0404.mui)的方式。

     a. 开启步骤一的AppResLib项目,并进入所新增的String Table资源档;

     b. 根据en-US与zh-TW分别修改String Table,如下:

          ‧en-US:Caption的值是自订的

ID Value Caption
AppTile 100 My Application
AppTileString 200 My Application

          ‧zh-TW

ID Value Caption
AppTile 100 我的应用程序
AppTileString 200 我的应用程序

     c. en-US改好String Table后,进行项目的建置,自动产出AppResLib.dll,并将Dll更名为:AppResLib.dll.0409.mui;

     d. zh-TW改好String Table后,进行项目的建置,自动产出AppResLib.dll,并将Dll更名为:AppResLib.dll.0404.mui;

3. 将Dll与语言包放置于Windows Phone Project中与App.xaml同层的数据夹

     将AppResLib.dll、AppResLib.dll.0409.mui与AppResLib.dll.0404.mui放置于Windows Phone Project项目中,

一定要与App.xaml文件同层数据夹,通常就是项目的根目录。接着把三个文件透过Solution Explorer加入项目,

将三个项目的Build Action设定为Content

4. 修改Windows Phone Application项目中的WMAppManifest.xml,并且重新对项目重新建置

     a. 调整 标签中的Title属性:

          将Title改为@AppResLib.dll,-100,让系统根据AppResLib找到String Table中Value = 100的Caption值。

   1: 
 
 

  
  

    
  
  
   2:      ProductID="{product id}"
   3:      Title="@AppResLib.dll,-100"
   4:      RuntimeType="Silverlight"
   5:      Version="1.0.0.0"
   6:      Genre="apps.normal"
   7:      Author="author"
   8:      Description="description"
   9:      Publisher="publisher">


     b. 调整 标签中的Title属性:

          将Title改为@AppResLib.dll,-200,让系统根据AppResLib找到String Table中Value = 200的Caption值。

   1: 
   
   
   2:   
   
   
   3:     
   
   
    
    Background.png
   
   
   4:     
   
   
    
    0
   
   
   5:     @AppResLib.dll,-200
   6:   
   7: 


     d. 重新建置Application项目,并且布署至实例设备或Emulator进行测试。

          =>测试时,透过更换设定中“地区+语言”中的“显示语言”的值来进行测试。

======

以上是补充如何对应用程序的名称在Windows Phoneo程序清单与Application Tile二个范围实践多语系的方式。

In addition, there has helped us find a good example of the establishment of the document: How to localize The Title in a WP7 Silverlight application.

References:

‧How to: Localize an Application Title for Windows Phone

‧How to localize The Title in a WP7 Silverlight application (there are well-established multi-language rich in C ++ package)

Dotblogs Tags: Windows Phone


Original: Big Box  Windows Phone - Multi-language application name


Guess you like

Origin www.cnblogs.com/petewell/p/11465531.html
Recommended