本地化策略 [英] Localization Strategy

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

问题描述

我们目前正在讨论两种本地化策略:

We're currently debating two strategies of localization:

A.

例如/Resources/Schema.xml

for eg. /Resources/Schema.xml

在一个单独的CSV文件中:我们具有翻译的所有键/值对:

in a separate CSV file: we have all key/value pairs for the translations:

/Resources/Localized.txt

/Resources/Localized.txt

Model_Title,标题,标题(法语),...

Model_Title, Title, Title (in French), ...

这样,当结构改变时,我们只需在LocalizedKey到位的情况下更改XML一次即可.

This way, when the structure changes, we just change XML once while the LocalizedKey's are in place.

B.根据文化,每种语言都有单独的XML文件.

例如有两个文件: /Resources/zh-CN/US-Localized.xml /Resources/fr-AU/AU-Localized.xml

eg. have two files: /Resources/en-US/US-Localized.xml /Resources/fr-AU/AU-Localized.xml

这样,它们将具有相同的架构,但文件分开.因此,与选项#1(只能更改一次)的用户相反,用户必须确保这些模式与更改两次所需的模式相同.

This way, they will have same schema but separate files. Therefore the user would have to make sure that the schemas are the same as they would need to change it twice as opposed to Option #1 where they can just change it once.

但是,由于用户不必跟踪进行更改的键,因此此处的可读性要好得多.

However, the readability here is much better since the user would not have to track the key the make the changes.

您对我建议的策略有何想法/想法?

What are your thoughts/ideas on the strategies I suggested?

谢谢

推荐答案

通常,您应该考虑使用现有工具,而不是从头开始.

In general, you should consider existing tools, rather than start from the scratch.

在.net中,我们使用的是数据驱动的ASP.NET本地化 资源提供者和编辑者 rick strahl

In .net we are using Data Driven ASP.NET Localization Resource Provider and Editor Created by rick strahl

这篇关于本地化策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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