更好的本地化方法-Windows应用程序 [英] Better ways to Localization - Windows application

查看:96
本文介绍了更好的本地化方法-Windows应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我打算开发一个具有本地化(英文,阿拉伯语中文)的应用程序(windows).您建议采用哪种方式进行本地化?我从事Windows应用程序已经很长时间了.

在此之前,我曾在以前的公司中为Intranet网站使用本地化.在CP文章系列的下面,我已经使用了该文章.非常棒.感谢 Karl Seguin .
创建多语言网站-第1部分 [创建多语言网站-第2部分 [创建多语言网站-第3部分 [

Hi, I''m planning to develop an application(windows) with localization(English, Arabic & Chinese). Which way you''re recommending for localization? It''s been long time I have worked on Windows applications.

Herebefore I have used localization for an intranet website in my previous company. Below CP article series I have used for that work. Really awesome. Thanks to Karl Seguin.
Creating multilingual websites - Part 1[^]
Creating multilingual websites - Part 2[^]
Creating Multilingual websites - Part 3[^]

But now I''m developing a windows application. I don''t want to use Resource files because it has couple of disadvantages(Need to compile everytime when I add new keys, etc.,). Any other better ways please. Above article(s) used just a xml file for localization. During deployment I just had to replace the xml file.

Thank you. BTW no need to rush, please take your time.

推荐答案

除非您用未编译的代码描述接口,然后每当添加新密钥时,您就可以了"无论如何都必须重新编译您的代码.但是,如果您不想将内容存储在资源文件中,则可以执行我们为几个客户所做的工作-将数据存储在数据库中.

基本上,您有一个列出所支持语言的表,一个带有键的表和一个带i18n的表(这还具有帮助您强制执行参照完整性的优点).翻译的内容链接到语言和键,您应该考虑放入一些东西来标识默认语言-以提供价值回落.您可以做很多事情,但这应该提供一个很好的起点.
Unless you are describing your interface in none compiled code, then whenever you add a new key, you''ll have to recompile your code anyway. If, however, you don''t want to store your content in resource files, then you could do what we have done for a couple of our clients - store the data in a database.

Basically, you have a table that lists the languages you support, a table with the keys in, and tables with the i18n in (this also has the advantage of helping you enforce referential integrity). The translated content links to the language and the key, and you should consider putting something in to identify the default language - to provide value fallback. There''s a lot more you can do with this, but this should provide a good starting point.


这篇关于更好的本地化方法-Windows应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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