Sys.CultureInfo.name 属性

更新:2007 年 11 月

获取表示语言和地区的区域性值(区域设置)。

var a = cultureInfoVar.name;

返回值

表示语言和地区的区域性值(区域设置)。

备注

使用 name 字段可以获取区域性值。区域性值提供有关特定区域性(区域设置)的信息。区域性值由两个表示语言的字母和两个表示国家或地区的大写字母组合而成。示例包括 es-MX(西班牙语/墨西哥)、es-CO(西班牙语/哥伦比亚)和 fr-CA(法语/加拿大)。

示例

下面的示例演示如何使用 Sys.CultureInfo 类的 name 字段。此示例为 dateTimeFormat 字段主题中一个更大示例的一部分。

// Get the name field of the CurrentCulture object
var cultureName = cultureObject.name;
// Get the name field of the CurrentCulture object
var cultureName = cultureObject.name;

请参见

参考

Sys.CultureInfo 类

其他资源

语言参考