# 本地化评审Localizability review

## 处理区分区域性的功能Handle culture-sensitive features

.NET 在许多方面都不提供编程支持，而且各区域性之间差别很大。.NET does not provide programmatic support in a number of areas that vary widely by culture. 大多数情况下，你必须编写自定义代码来处理诸如以下方面的功能特性：In most cases, you have to write custom code to handle feature areas like the following:

• 电话号码Telephone numbers

• 纸张大小Paper sizes

• 用于长度、重量、面积、体积和温度的度量单位Units of measure used for lengths, weights, area, volume, and temperatures

虽然 .NET 不对度量单位之间的转换提供内置支持，但可以使用 RegionInfo.IsMetric 属性确定特定国家或地区是否使用公制，如下面的示例所示。Although .NET does not offer built-in support for converting between units of measure, you can use the RegionInfo.IsMetric property to determine whether a particular country or region uses the metric system, as the following example illustrates.

using System;
using System.Globalization;

public class Example
{
public static void Main()
{
string[] cultureNames = { "en-US", "en-GB", "fr-FR",
"ne-NP", "es-BO", "ig-NG" };
foreach (var cultureName in cultureNames) {
RegionInfo region = new RegionInfo(cultureName);
Console.WriteLine("{0} {1} the metric system.", region.EnglishName,
region.IsMetric ? "uses" : "does not use");
}
}
}
// The example displays the following output:
//       United States does not use the metric system.
//       United Kingdom uses the metric system.
//       France uses the metric system.
//       Nepal uses the metric system.
//       Bolivia uses the metric system.
//       Nigeria uses the metric system.

Imports System.Globalization

Module Example
Public Sub Main()
Dim cultureNames() As String = {"en-US", "en-GB", "fr-FR",
"ne-NP", "es-BO", "ig-NG"}
For Each cultureName In cultureNames
Dim region As New RegionInfo(cultureName)
Console.WriteLine("{0} {1} the metric system.", region.EnglishName,
If(region.IsMetric, "uses", "does not use"))
Next
End Sub
End Module
' The example displays the following output:
'       United States does not use the metric system.
'       United Kingdom uses the metric system.
'       France uses the metric system.
'       Nepal uses the metric system.
'       Bolivia uses the metric system.
'       Nigeria uses the metric system.


• 在操作系统版本之间无法正确执行反序列化的序列化数据。Serialized data that does not deserialize correctly across operating system versions.

• 不反映当前区域性的约定的数值数据。Numeric data that does not reflect the conventions of the current culture. 例如，显示的数字可能带有错误的组分隔符、小数分隔符或货币符号。For example, numbers may be displayed with inaccurate group separators, decimal separators, or currency symbols.

• 不反映当前区域性的约定的日期和时间数据。Date and time data that does not reflect the conventions of the current culture. 例如，表示月和日的数字可能会以错误的顺序出现，日期分隔符可能不正确，或者时区信息可能不正确。For example, numbers that represent the month and day may appear in the wrong order, date separators may be incorrect, or time zone information may be incorrect.

• 找不到的资源，因为尚未确定应用程序的默认区域性。Resources that cannot be found because you have not identified a default culture for your application.

• 以特定区域性中的异常顺序显示的字符串。Strings that are displayed in an unusual order for the specific culture.

• 返回意外结果的字符串比较或相等比较。String comparisons or comparisons for equality that return unexpected results.