什么是处理mufti语言应用程序的最佳方式,包括数据和标签 [英] Whats the best way to handle mufti language application including data and labels

查看:93
本文介绍了什么是处理mufti语言应用程序的最佳方式,包括数据和标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们希望我们的应用程序(.net)支持不同的语言,包括标签和数据。

什么是最好的方法。

我们是否应该使用不同语言的预定义数据单独使用dbs?

解决方案

< blockquote>您在.NET中期待的功能称为全球化。大多数应用程序是为仅限英语的受众开发的,但由于Unicode是一种支持每种语言的字符集,因此现在大多数应用程序都是在构建时考虑到每种语言和文化。



在.NET框架中,全球化和本地化对那些希望从非英语受众的应用程序中获得最大收益的人来说非常重要。添加全球化或本地化不仅为您提供了诸如为不同环境提供不同文本的功能,还提供了其他功能,例如:



1.在本地文化中编写数字。

- 在英语中你可以写:100.90,但在德语中你会写100,90。它们在两者中都有不同的含义。使用文化可以确保您消除了歧义。



2.提供拼写和角色支持。太明显了。



System.Globalization [ ^ ]是提供我已经谈过的功能的命名空间,其余的也用于提供与文化无关的功能UI或他们称之为文化中立的。

除此之外,可以在System.Text命名空间下找到所使用的编码。确保您使用的是Unicode,ASCII不支持阿拉伯语,中文,印地语或古吉拉特语等字符。因此请确保您不会丢失任何数据。作为Unicode的指南,您可以阅读我的这篇文章:阅读和在.NET中编写Unicode数据 [ ^ ]



.NET应用程序中的全球化和本地化 [ ^ ]。 (MSDN文件)


We want our application(.net) to support different languages, including the labels and also data.
Whats the best way to do.
Should we have separate dbs with predefined data in different languages?

解决方案

The feature that you are looking forward to in .NET is known as Globalization. Most applications are developed for English-only audience but since Unicode is an every-language-supported character set that is why most of the applications now are built keeping every language and culture in mind.

In .NET framework, Globalization and Localization is of great importance for those who want to make most out of their application for non-English audience also. Adding Globalization or Localization not only provides you with features such as provided different text for different environments but also additional features, such as:

1. Writing numerals in native culture.
- In English you may write: 100.90, but in German you would write 100,90. They have a different meaning in both. Using cultures would allow you to make sure you have removed the ambiguity.

2. Providing spellings and character support. Too obvious.

System.Globalization[^] is the namespace that provides the functions that I have already talked about and the rest of them which are also used to provide culture-independent UI or what they call as culture-neutral.
Apart from that the encodings used can be found under System.Text namespace. Make sure you are using Unicode, ASCII doesn't support the characters for Arabic, Chinese, Hindi or Gujarati etc. So make sure you are not going to lose any data. As a guide for Unicode, you can read this article of mine: Reading and writing Unicode data in .NET[^]

Globalization and Localization in .NET applications[^]. (MSDN document)


这篇关于什么是处理mufti语言应用程序的最佳方式,包括数据和标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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