积极答复者
如何解析appxmainfest.xml中的资源字符串

问题
-
在app配置文件appmainfest.xml中 有许多资源字符串如 displayname 和 description 中的资源字符串 这中资源字符串 前缀都是ms-resource:
<DisplayName>ms-resource:IDS_MANIFEST_MUSIC_APP_NAME</DisplayName>
<PublisherDisplayName>Microsoft Corporation</PublisherDisplayName>
<Description>ms-resource:IDS_MANIFEST_MUSIC_APP_DESCRIPTION</Description>
请问如何在程序解析这样的字符串呢 有什么api么 我看SHLoadIndirectString在这里也无法使用
答案
-
你好,这个的话我认为你可以参考一下这个文档:http://msdn.microsoft.com/zh-cn/library/hh694557.aspx
最终resw生成的结果是一个PRI文件,但是目前貌似只有在商店应用内部可以使用API: ResourceLoader class 来获取本地化的结果,似乎无法从外部解析。不过如果你可以解析PRI文件的话,应该就不是难事了。
PS:还是得废话一句,本论坛主要支持的是商店应用内部的开发,对于类似桌面环境的开发或许可以去C#/C++论坛去询问吧
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 jiangjiji 2014年8月14日 2:24
全部回复
-
你好 jiangjiji,
你想通过代码读取什么样的项目信息?
请参考下这个文档: http://msdn.microsoft.com/zh-cn/library/windows/apps/hh454044.aspx
出现ms-resource的意思是代码开发人员为代码做了本地化处理。比如说IDS_MANIFEST_MUSIC_APP_NAME可能在中国显示的是AAA,但是在美国就显示的是BBB,是根据用户地域不同而做的文字变化。
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later. -
你好,这个的话我认为你可以参考一下这个文档:http://msdn.microsoft.com/zh-cn/library/hh694557.aspx
最终resw生成的结果是一个PRI文件,但是目前貌似只有在商店应用内部可以使用API: ResourceLoader class 来获取本地化的结果,似乎无法从外部解析。不过如果你可以解析PRI文件的话,应该就不是难事了。
PS:还是得废话一句,本论坛主要支持的是商店应用内部的开发,对于类似桌面环境的开发或许可以去C#/C++论坛去询问吧
--James
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 jiangjiji 2014年8月14日 2:24