C# 中的全球化

发布于 2024-08-09 23:36:54 字数 100 浏览 3 评论 0原文

有人可以向我解释一下 C# 中全球化有什么用吗?

它用于转换目的吗?我的意思是我想将任何英语单词转换为选定的语言。

那么这种全球化或文化信息对我有帮助吗?

Can somebody explain to me what is the use of globalization in C#?

Is it used for conversion purposes? I mean I want to convert any English word into a selected language.

So will this globalization or cultureinfo help me?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

玩世 2024-08-16 23:36:55

来自 MSDN

System.Globalization - 包含
定义与文化相关的类
信息,包括语言,
国家/地区、日历
使用,日期的格式模式,
货币和数字以及排序
字符串的顺序。

该程序集有助于使您的应用程序具有文化意识,并在 .NET 框架内部大量使用。例如,当从日期转换为字符串时,全球化用于确定使用什么格式,例如“11/28/2009”或“28-11-2009”。通常,此确定是在框架内自动完成的,而无需直接使用程序集。但是,如果需要,您可以直接使用全球化来查找特定于文化的信息供您自己使用。

From MSDN:

System.Globalization - contains
classes that define culture-related
information, including the language,
the country/region, the calendars in
use, the format patterns for dates,
currency and numbers, and the sort
order for strings.

This assembly helps in making your application culture-aware, and is used heavily internally within the .NET framework. For example, when converting from Date to String, Globalization is used to determine what format to use, such as "11/28/2009" or "28-11-2009". Generally this determination is done automatically within the framework without you ever using the assembly directly. However, if you need to, you can use Globalization directly to look up culture-specific information for your own use.

摘星┃星的人 2024-08-16 23:36:55

为了消除更多混乱,

本地化(或非美国人的本地化),简称 L10n:针对特定位置调整程序的过程。它包括翻译资源、适配 UI(如果需要)等。

国际化,简称 i18n:适配程序以支持本地化、区域字符、格式等的过程,但最重要的是让程序能够支持本地化、区域字符、格式等的过程。无论当前的区域设置和操作系统语言版本如何,都可以正常工作。

全球化,简称g11n:由i18n和L10n两者组成。

To clear even more confusion

Localization (or Localisation for non-US people), L10n for short: process of adapting program for a specific location. It consist of translating resources, adapting UI (if necessary), etc.

Internationalization, i18n for short: process of adapting program to support localization, regional characters, formats and so on and so forth, but most importantly, the process of allowing program to work correctly regardless of current locale settings and OS language version.

Globalization, g11n for short: consist of both i18n and L10n.

久而酒知 2024-08-16 23:36:55

为了消除一些混乱:

全球化:允许您的程序在运行时使用从外部资源 DLL 加载的区域设置特定资源。这意味着将所有字符串放入资源文件中,而不是将它们硬编码到源代码中。

本地化:使您的程序适应特定的区域设置。这可能是翻译字符串并使对话框从右到左读取阿拉伯语等语言。

此处是创建 Satellite DLL 的链接。它说的是 C++,但同样的原理也适用于 C#。

To clear some confusion:

Globalisation: Allowing your program to use locale specific resources loaded from an external resource DLL at runtime. This means putting all your strings in resource files rather than hard coding them into the source code.

Localisation: Adapting your program for a specific locale. This could be translating Strings and making dialog boxes read right-to-left for languages such as Arabic.

Here is a link to creating Satellite DLLs. Its says C++ but it the same principle applies to C#.

世界等同你 2024-08-16 23:36:55

全球化:-
全球化是为多种文化地区设计和开发应用程序的过程。

本土化:-
本地化是针对给定文化和地区定制应用程序的过程。

Globalization:-
Globalization is the process of designing and developing applications for multiple cultures regions.

Localization:-
Localization is the process of customizing application for a given culture and locale.

↙温凉少女 2024-08-16 23:36:54

全球化是一种针对特定文化格式化文本的方法。例如,数字 1000 的字符串表示形式对于英国可能是 1,000.00,对于法国可能是 1'000,00。这是一个相当深入的主题,但这是基本目标。
它不是翻译服务,但它确实允许您确定应用程序运行的文化,从而允许您选择要显示的语言。但是,您必须自己提供文本翻译,通常是通过资源文件的方式。

Globalization is a means of formatting text for specific cultures. E.g. a string representation of the number 1000 may be 1,000.00 for the UK or 1'000,00 for France. It is quite an in depth subject but that is the essential aim.
It is NOT a translation service, but it does allow you to determine the culture under which your application is running and therefore allow you to choose the language you want to display. You will have to provide text translation yourself, however, usually by means of resource files.

許願樹丅啲祈禱 2024-08-16 23:36:54

全球化是一种允许用户自定义他或她可能使用的应用程序以适应他们可能所处的标准的方法。定制允许:

  1. 货币格式
  2. 时间
  3. 日期
  4. 文本方向

适合文化。当前设置的区域由操作系统处理并传递给您的应用程序。全球化/国际化 (I18n) 通常还会促使开发人员将程序的显示文本与其本身的实现分开。

Globalization is a way of allowing the user to customize the application that he or she may be using to fit the standards where they may be. Cusomtization allows for the:

  1. Money Formatting
  2. Time
  3. Date
  4. Text orientation

To be culturally appropriate. The region that is currently set is handled by the OS and passed to your application. Globalization/Internationalization(I18n) also typically motivates the developer to separate the displayed text of the program from the implementation its self.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文