Silverlight 通过资源文件本地化字符串还是?
关于如何实现 Silverlight 应用程序本地化的一般建议是什么?
我的第一个想法是,我们可以在资源文件或将本地化存储在数据库的资源表中进行选择。
每种方法的优点和缺点是什么?还有其他方法吗?
资源文件的渲染速度会更快并减少流量,因为您不需要从 Web 服务检索字符串。
从数据库来看,它可能更容易维护。
假设我们需要实现 3-4 种不同的语言。您会选择什么?为什么?
What are the general advice on how to implement localization of a Silverlight application?
My first thought is that we've got a choice between resource files or storing the localization in resource tables in the database.
What are the pro's and con's for each method? Are there other methods?
Resource files would be render faster and reduce traffic as you wouldn't need to retrieve the strings from a webservice.
From a database it might be easier to maintain.
Let's say we would need to implement 3-4 different languages. What would be your choice, ..and why?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我知道这会得到很多传统的答案,但我也想提出一些完全原创的东西,我们自己尝试(并成功)使用附加属性而不是绑定来更有效地本地化 Silverlight:
链接:完成后的 Silverlight 项目本地化
我们发现资源和绑定解决方案繁琐且不灵活因为它们都需要设置翻译在项目中(因此在更改时需要重新部署应用程序)。
传统上,翻译是批量发送的,并按语言进行管理(使用唯一的密钥、译者注释等)。 (有一些工具可以使资源转换变得更容易,但我们找到了更好的方法)。
我们的解决方案意味着我们在中央服务器数据库中管理本地化,但也可以在应用程序本身内提供本地化编辑器,供翻译人员在使用应用程序时使用。
资源的优点:
资源的缺点:
数据库的优点:< /strong>
数据库的缺点:
I know this will get a lot of traditional answers, but I would also like to put forward something completely original we tried (and succeeded) doing ourselves for more efficient localisation of Silverlight using Attached Properties instead of binding:
Link: Localisation of Silverlight projects after completion
We found resources and binding solutions to be tedious and not flexible as they all require the translations to be set in the project (and therefore needs a re-deploy of the app when it changed).
Traditionally translations are sent out in batches and managed by language (with unique keys, translator notes etc). (There are tools to make the conversion to resources easier, but we found a better way).
Our solution means we manage the localisation in a central server database but can also provide localisation editor, within the application itself, for translators to use while using the application.
Pros for resources:
Cons for resource:
Pros for Database:
Cons for Database: