JavaScript Intl 对象
- Intl
- Intl对象是 ECMAScript 国际化 API 的一个命名空间,它提供了精确的字符串对比、数字格式化,和日期时间格式化。DateTimeFormat对象的构造函数是Intl对象的属性。本页文档内容包括了这些属性,以及国际化使用的构造器和其他语言的方法等常见的功能。属性Intl.Collator
- Intl.getCanonicalLocales()
- Intl.getCanonicalLocales()方法返回一个数组,数组包含规范的区域语言代码,重复的元素将会被去除,每一个元素都会被验证为格式有效的区域语言代码。SyntaxIntl.getCanonicalLocales(locales)参数locales想要规范化的字符串数组。Return
- Intl.supportedValuesOf()
- Intl.supportedValuesOf()方法返回一个数组,其中包含实现支持的日历、排序规则、货币、编号系统或单位值。重复项被省略,数组按字母升序排序(或者更准确地说,使用Array.prototype.sort()和undefined比较函数)该方法可用于特性测试特定实现中是否支持值,并仅在
- Intl.Collator
- Intl.Collator 是用于语言敏感字符串比较的 collators构造函数。语法new Intl.Collator([locales[, options]])Intl.Collator.call(this[, locales[, options]])参数locales可选.缩写语言代码(BC
- Intl.DateTimeFormat
- Intl.DateTimeFormat是根据语言来格式化日期和时间的对象的构造器。语法new Intl.DateTimeFormat([locales[, options]])Intl.DateTimeFormat.call(this[, locales[, options]])参数locales可
- Intl.ListFormat
- Intl.ListFormat是一个语言相关的列表格式化构造器。语法new Intl.ListFormat([locales[, options]])参数locales可选的.。符合 BCP 47 语言标注的字符串或字符串数组。locales参数的一般形式和相关解释,请参阅 Intl page.op
- Intl.NumberFormat
- Intl.NumberFormat是对语言敏感的格式化数字类的构造器类语法new Intl.NumberFormat([locales[, options]])Intl.NumberFormat.call(this[, locales[, options]])参数locales可选.缩写语言代码(B
- Intl.PluralRules
- 该对象的英文请立即获取iTunes多种敏感格式状语从句:多种语言规则的对象的构造函数。Intl.PluralRules句法new Intl.PluralRules([locales[, options]])Intl.PluralRules.call(this[, locales[, options]
- Intl.RelativeTimeFormat
- 该Intl.RelativeTimeFormat对象是对象的构造函数,用于启用语言敏感的相对时间格式。句法new Intl.RelativeTimeFormat([locales[, options]])参数locales可选的。带有BCP 47语言标记的字符串,或此类字符串的数组。有关参数的一般形
- Intl.Locale
- Intl.Locale构造器(constructor)是 Intl 对象的标准内置属性。语法(Syntax)new Intl.Locale([tag[, options]])描述(Description)Intl.Locale 对象包含以下属性和方法:属性(Properties)Intl.Local