Are there localization tools which spot content strings in xaml/wpf?

此生再无相见时 提交于 2019-12-10 07:10:17

问题


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.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/4876950/are-there-localization-tools-which-spot-content-strings-in-xaml-wpf

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!