是否有本地化工具可以发现xaml/wpf中的内容字符串? [英] Are there localization tools which spot content strings in xaml/wpf?

查看:71
本文介绍了是否有本地化工具可以发现xaml/wpf中的内容字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用静态resx类对wpf应用程序进行全球化时,很容易会错过将Content属性设置为特定语言(例如英语)的硬编码字符串的奇数标签或按钮.当然,这些应该移到{x:Static ...}以便可以针对每种文化进行本地化.

When globalizing a wpf application with static resx classes, it's very easy to miss the odd label or button that has its Content property set to a hard coded string in a particular language, ie English. These should of course be moved off to a {x:Static ...} so they can be localised for each culture.

是否有任何工具可以发现并警告您?内置到VS中将是理想的选择,但是我认为'style cop'类型的构建工具也可以完成这项工作.

Are there any tools which can spot this and warn you? Built in to VS would be ideal, but I'm thinking that 'style cop' type build tools would do the job as well.

推荐答案

David Anson 发布了这样的工具几周前.这是一个伪本地化工具,它可以更改ResX文件中定义的所有字符串,以使其脱颖而出从静态字符串.它将字母更改为重音形式,并在字符串中添加了填充,以便您可以通过更长的翻译来测试语言中的布局更改.

David Anson posted just such a tool a few weeks ago. It's a pseudo-localization tool that alters all the strings defined in ResX files so that they stand out from static strings. It changes letters to their accented forms, and also adds padding to strings so you can test for layout changes in languages with longer translations.

这篇关于是否有本地化工具可以发现xaml/wpf中的内容字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆