ASP.NET,TSQL,C#,Javascript中的全球化和本地化问题 [英] Globalisation and Localisation issues in ASP.NET , TSQL, C#, Javascript

查看:49
本文介绍了ASP.NET,TSQL,C#,Javascript中的全球化和本地化问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在一个全球化项目中工作,我需要以多种语言(例如日语,德语,意大利语等)支持现有项目.关于资源管理,我创建了资源文件并成功地对其进行了处理.关于数据库方面,我知道我需要将varchar更改为NVarchar.我有以下查询.清单很大,请多多包涵.

1.如何针对每种区域性在SQL数据库中存储和从SQL数据库检索DATETIME值?
2.如何从数据库表中检索值以在DROPDOWN列表中显示值?
3.应该如何处理GRID数据?
4.如何分别执行针对每个文化的SEARCH和SORT操作?
5.有什么方法可以对每种语言进行拼写检查?
6.如何为每种文化实施VALIDATION部分?
7.项目中使用了一些第三方控件,这些控件以标准英语返回结果.如何在第三方控制上实施全球化?

任何帮助深表感谢.

I am working in a Globalisation project where I need to support an existing project into various languages such as Japanese, Germany, Italian and much more. Regarding the Resource management I create resource files and handled it successfully. Regarding the database side I aware I need to change varchar to NVarchar. I have below queries. The list is big one please bear with me.

1. How to store and retrieve DATETIME value to and from SQL database for each culture?
2. How could I retrieve values from database table to show values in a DROPDOWN list?
3. How GRID data should be handled?
4. How to implement SEARCH and SORT operation to be handled for each culure seperatly?
5. Is there any way to implement Spell check for each language?
6. How to implement VALIDATION part for each culture?
7. Some of the Third party controls are being used in the project which return results in Standard english. How to implement Globalisation on Third party controls?

Any help is much appreciated. Thanks.

推荐答案

问题2和问题3的解决方案:
可能的解决方案-
(A)在您的表中再增加一列-language_id.修改您的主键,并添加language_id作为主键的一部分.创建具有不同语言特定值的同一记录的多个条目.因此,在检索数据时,还需要传递language_id以及当前的主键值.

(B)使用诸如-labels_en.properties,labels_fr.properties等的属性文件,并利用这些属性文件中的键来获取特定于语言的值.

(C)如果您的项目是基于Internet的,则可以直接使用Google翻译服务,只需在代码中添加一小段代码即可将现有的网页转换为所需的语言.

谢谢&问候,
尼拉·索尼(Nial Soni)
Solution for Question-2 and Question-3:
possible solutions -
(A) Add one more column to your table - language_id. Modify your primary key, and add language_id also as a part of your primary key. Create multiple entries of the same record with different language specific values. So, when you retrieve your data, you need to pass language_id also along with the present primary key value.

(B) Make use of the properties file like - labels_en.properties, labels_fr.properties etc. and make use of the key in these property files for fetching the language specific values.

(C) If your project is internet based, you can make use of the Google Translation service directly, which can convert your existing web page into desired language, just by adding small piece of block in your code.

Thanks & Regards,
Niral Soni


这篇关于ASP.NET,TSQL,C#,Javascript中的全球化和本地化问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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