ImageVerifierCode 换一换
格式:PDF , 页数:48 ,大小:1.18MB ,
资源ID:704835      下载积分:10000 积分
快捷下载
登录下载
邮箱/手机:
温馨提示:
如需开发票,请勿充值!快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝扫码支付 微信扫码支付   
注意:如需开发票,请勿充值!
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【http://www.mydoc123.com/d-704835.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(ECMA 402-2015 ECMAScript Internationalization API Specification (2nd Edition).pdf)为本站会员(hopesteam270)主动上传,麦多课文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知麦多课文库(发送邮件至master@mydoc123.com或直接QQ联系客服),我们立即给予删除!

ECMA 402-2015 ECMAScript Internationalization API Specification (2nd Edition).pdf

1、 Reference number ECMA-123:2009 Ecma International 2009 ECMA-402 2nd Edition / June 2015 ECMAScript 2015 Internationalization API Specification COPYRIGHT PROTECTED DOCUMENT Ecma International 2015 Ecma International 2015 i Copyright notice Copyright 2015 Ecma International Ecma International Rue du

2、Rhone 114 CH-1204 Geneva Tel: +41 22 849 6000 Fax: +41 22 849 6001 Web: http:/www.ecma-international.org This document and possible translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared,

3、copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright

4、notice or references to Ecma International, except as needed for the purpose of developing any document or deliverable produced by Ecma International (in which case the rules applied to copyrights must be followed) or as required to translate it into languages other than English. The limited permiss

5、ions granted above are perpetual and will not be revoked by Ecma International or its successors or assigns. This document and the information contained herein is provided on an “AS IS“ basis and ECMA INTERNATIONAL DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRAN

6、TY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.“ Software License All Software contained in this document (“Software)“ is protected by copyright and is being made available under the “B

7、SD License“, included below. This Software may be subject to third party rights (rights from parties other than Ecma International), including patent rights, and no licenses under such third party rights are granted under this license even if the third party concerned is a member of Ecma Internation

8、al. SEE THE ECMA CODE OF CONDUCT IN PATENT MATTERS AVAILABLE AT http:/www.ecma-international.org/memento/codeofconduct.htm FOR INFORMATION REGARDING THE LICENSING OF PATENT CLAIMS THAT ARE REQUIRED TO IMPLEMENT ECMA INTERNATIONAL STANDARDS*. Redistribution and use in source and binary forms, with or

9、 without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list

10、of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the authors nor Ecma International may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTW

11、ARE IS PROVIDED BY THE ECMA INTERNATIONAL “AS IS“ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ECMA INTERNATIONAL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,

12、SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OT

13、HERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ii Ecma International 2015 Ecma International 2015 iii Contents Page Copyright notice i 1 Scope 1 2 Conformance . 1 3 Normative References . 1 4 Overview . 2 4.1 Internationalization, Loca

14、lization, and Globalization 2 4.2 API Overview 2 4.3 Implementation Dependencies 3 5 Notational Conventions 3 5.1 Well-Known Intrinsic Objects . 4 6 Identification of Locales, Currencies, and Time Zones . 5 6.1 Case Sensitivity and Case Mapping 5 6.2 Language Tags 5 6.2.1 Unicode Locale Extension Se

15、quences 5 6.2.2 IsStructurallyValidLanguageTag (locale) 5 6.2.3 CanonicalizeLanguageTag (locale) . 6 6.2.4 DefaultLocale () 6 6.3 Currency Codes . 6 6.3.1 IsWellFormedCurrencyCode (currency) . 6 6.4 Time Zone Names 6 6.4.1 IsValidTimeZoneName (timeZone) . 7 6.4.2 CanonicalizeTimeZoneName (timeZone)

16、7 6.4.3 DefaultTimeZone () 7 7 Requirements for Standard Built-in ECMAScript Objects 7 8 The Intl Object 7 8.1 Properties of the Intl Object . 7 9 Locale and Parameter Negotiation 8 9.1 Internal slots of Service Constructors 8 9.2 Abstract Operations 8 9.2.1 CanonicalizeLocaleList (locales) . 8 9.2.

17、2 BestAvailableLocale (availableLocales, locale) . 9 9.2.3 LookupMatcher (availableLocales, requestedLocales) . 9 9.2.4 BestFitMatcher (availableLocales, requestedLocales) 10 9.2.5 ResolveLocale (availableLocales, requestedLocales, options, relevantExtensionKeys, localeData) . 10 9.2.6 LookupSupport

18、edLocales (availableLocales, requestedLocales) . 11 9.2.7 BestFitSupportedLocales (availableLocales, requestedLocales) 12 9.2.8 SupportedLocales (availableLocales, requestedLocales, options) . 12 9.2.9 GetOption (options, property, type, values, fallback) 12 9.2.10 GetNumberOption (options, property

19、, minimum, maximum, fallback) 13 10 Collator Objects . 13 10.1 The Intl.Collator Constructor 13 10.1.1 InitializeCollator (collator, locales, options) . 13 10.1.2 Intl.Collator( locales , options) 15 10.2 Properties of the Intl.Collator Constructor . 15 10.2.1 Intl.Collator.prototype . 15 10.2.2 Int

20、l.Collator.supportedLocalesOf (locales , options ) . 15 iv Ecma International 2015 10.2.3 Internal slots 15 10.3 Properties of the Intl.Collator Prototype Object 16 10.3.1 Intl.Collator.prototype.constructor . 16 10.3.2 Intl.Collator.prototypetoStringTag 16 10.3.3 Intl.Cpare 16 10.3.4 Collator Compa

21、re Functions . 16 10.3.5 Intl.Collator.prototype.resolvedOptions () . 17 10.4 Properties of Intl.Collator Instances . 17 11 NumberFormat Objects 18 11.1 The Intl.NumberFormat Constructor. 18 11.1.1 InitializeNumberFormat (numberFormat, locales, options) . 18 11.1.2 Intl.NumberFormat( locales , optio

22、ns) . 19 11.2 Properties of the Intl.NumberFormat Constructor 20 11.2.1 Intl.NumberFormat.prototype 20 11.2.2 Intl.NumberFormat.supportedLocalesOf (locales , options ) 20 11.2.3 Internal slots 20 11.3 Properties of the Intl.NumberFormat Prototype Object 20 11.3.1 Intl.NumberFormat.prototype.construc

23、tor . 21 11.3.2 Intl.NumberFormat.prototypetoStringTag 21 11.3.3 Intl.NumberFormat.prototype.format 21 11.3.4 Number Format Functions . 21 11.3.5 Intl.NumberFormat.prototype.resolvedOptions () . 24 11.4 Properties of Intl.NumberFormat Instances . 24 12 DateTimeFormat Objects . 25 12.1 The Intl.DateT

24、imeFormat Constructor 25 12.1.1 InitializeDateTimeFormat (dateTimeFormat, locales, options) 25 12.1.2 Intl.DateTimeFormat( locales , options ) . 28 12.2 Properties of the Intl.DateTimeFormat Constructor 28 12.2.1 Intl.DateTimeFormat.prototype . 28 12.2.2 Intl.DateTimeFormat.supportedLocalesOf (local

25、es , options ) 28 12.2.3 Internal slots 29 12.3 Properties of the Intl.DateTimeFormat Prototype Object . 29 12.3.1 Intl.DateTimeFormat.prototype.constructor 29 12.3.2 Intl.DateTimeFormat.prototypetoStringTag 30 12.3.3 Intl.DateTimeFormat.prototype.format . 30 12.3.4 DateTime Format Functions 30 12.3

26、.5 Intl.DateTimeFormat.prototype.resolvedOptions () 31 12.4 Properties of Intl.DateTimeFormat Instances 32 13 Locale Sensitive Functions of the ECMAScript Language Specification . 32 13.1 Properties of the String Prototype Object 32 13.1.1 String.prototype.localeCompare (that , locales , options ) 3

27、2 13.1.2 String.prototype.toLocaleLowerCase (locales) . 33 13.1.3 String.prototype.toLocaleUpperCase (locales ) 33 13.2 Properties of the Number Prototype Object 34 13.2.1 Number.prototype.toLocaleString (locales , options ) . 34 13.3 Properties of the Date Prototype Object 34 13.3.1 Date.prototype.

28、toLocaleString (locales , options ) . 34 13.3.2 Date.prototype.toLocaleDateString (locales , options ) . 34 13.3.3 Date.prototype.toLocaleTimeString (locales , options ) 35 13.4 Properties of the Array Prototype Object . 35 13.4.1 Array.prototype.toLocaleString(locales , options ) 35 Annex A (inform

29、ative) Implementation Dependent Behaviour 37 Annex B (informative) Additions and Changes That Introduce Incompatibilities with Prior Editions . 39 Ecma International 2015 v Introduction The ECMAScript 2015 Internationalization API Specification (ECMA-402 2nd Edition), provides key language-sensitive

30、 functionality as a complement to the ECMAScript 2015 Language Specification (ECMA-262 6th Edition or successor). Its functionality has been selected from that of well-established internationalization APIs such as those of the Internationalization Components for Unicode (ICU) library, of the .NET fr

31、amework, or of the Java platform. The 1st Edition API was developed by an ad-hoc group established by Ecma TC39 in September 2010 based on a proposal by Neboja iri and Jungshik Shin. Internationalization of software is never complete. We expect significant enhancements in future editions of this spe

32、cification. Editor, 2nd Edition Rick Waldron Contributors Norbert Lindenberg Allen Wirfs-Brock Andr Bargull Steven R. Loomis Editor, 1st Edition Norbert Lindenberg Contributors Eric Albright Neboja iri Peter Constable Mark Davis Richard Gillam Steven Loomis Mihai Nita Addison Phillips Roozbeh Pourna

33、der Jungshik Shin Shawn Steele Allen Wirfs-Brock Feedback provided by Erik Arvidsson, John J. Barton, Zbigniew Braniecki, Marcos Cceres, Brendan Eich, John Emmons, Gordon P. Hemsley, David Herman, Luke Hoban, Oliver Hunt, Suresh Jayabalan, Yehuda Katz, Mark S. Miller, Andrew Paprocki, Adam Peller, A

34、xel Rauschmayer, Andreas Rossberg, Alex Russell, Markus Scherer, Dmitry Soshnikov, Yusuke Suzuki, John Tamplin, Rick Waldron, Anton Yatsenko, Nicholas Zakas. This Ecma Standard has been adopted by the General Assembly of June 2015. vi Ecma International 2015 Ecma International 2015 1 ECMAScript 2015

35、 Internationalization API Specification 1 Scope This Standard defines the application programming interface for ECMAScript objects that support programs that need to adapt to the linguistic and cultural conventions used by different human languages and countries. 2 Conformance A conforming implement

36、ation of the ECMAScript 2015 Internationalization API Specification must conform to the ECMAScript 2015 Language Specification (ECMA-262 6th Edition, or successor), and must provide and support all the objects, properties, functions, and program semantics described in this specification. A conformin

37、g implementation of the ECMAScript 2015 Internationalization API Specification is permitted to provide additional objects, properties, and functions beyond those described in this specification. In particular, a conforming implementation of the ECMAScript 2015 Internationalization API Specification

38、is permitted to provide properties not described in this specification, and values for those properties, for objects that are described in this specification. A conforming implementation is not permitted to add optional arguments to the functions defined in this specification. A conforming implement

39、ation is permitted to accept additional values, and then have implementation-defined behaviour instead of throwing a RangeError, for the following properties of options arguments: The options property localeMatcher in all constructors and supportedLocalesOf methods. The options properties usage and

40、sensitivity in the Collator constructor. The options properties style and currencyDisplay in the NumberFormat constructor. The options properties minimumIntegerDigits, minimumFractionDigits, maximumFractionDigits, minimumSignificantDigits, and maximumSignificantDigits in the NumberFormat constructor

41、, provided that the additional values are interpreted as integer values higher than the specified limits. The options properties listed in table 3 in the DateTimeFormat constructor. The options property formatMatcher in the DateTimeFormat constructor. 3 Normative References The following referenced

42、documents are required for the application of this document. For dated references, only the edition cited applies. For undated references, the latest edition of the referenced document (including any amendments) applies. ECMAScript 2015 Language Specification (ECMA-262 6th Edition, or successor). ht

43、tp:/www.ecma-international.org/publications/standards/Ecma-262.htm NOTE Throughout this document, the phrase “ES2015, x” (where x is a sequence of numbers separated by periods) may be used as shorthand for “ECMAScript 2015 Language Specification (ECMA-262 6th Edition, sub clause x)”. ISO/IEC 10646:2

44、003: Information Technology Universal Multiple-Octet Coded Character Set (UCS) plus Amendment 1:2005 and Amendment 2:2006, Amendment 3:2008, and Amendment 4:2008, plus additional amendments and corrigenda, or successor http:/www.iso.org/iso/catalogue_detail.htm?csnumber=39921 http:/www.iso.org/iso/c

45、atalogue_detail.htm?csnumber=40755 http:/www.iso.org/iso/catalogue_detail.htm?csnumber=41419 http:/www.iso.org/iso/catalogue_detail.htm?csnumber=44871 2 Ecma International 2015 http:/www.iso.org/iso/catalogue_detail.htm?csnumber=46311 ISO 4217:2008, Codes for the representation of currencies and fun

46、ds, or successor http:/www.iso.org/iso/iso_catalogue/catalogue_tc/catalogue_detail.htm?csnumber=46121 IETF BCP 47: RFC 5646, Tags for Identifying Languages, or successor http:/tools.ietf.org/html/rfc5646 RFC 4647, Matching of Language Tags, or successor http:/tools.ietf.org/html/rfc4647 IETF RFC 606

47、7, BCP 47 Extension U, or successor http:/tools.ietf.org/html/rfc6067 IANA Time Zone Database http:/www.iana.org/time-zones/ The Unicode Standard, Version 5.1, or successor http:/www.unicode.org/versions/latest Unicode Technical Standard 35, Unicode Locale Data Markup Language, version 21.0.1 or suc

48、cessor http:/unicode.org/reports/tr35/ 4 Overview This section contains a non-normative overview of the ECMAScript 2015 Internationalization API Specification. 4.1 Internationalization, Localization, and Globalization Internationalization of software means designing it such that it supports or can b

49、e easily adapted to support the needs of users speaking different languages and having different cultural expectations, and enables worldwide communication between them. Localization then is the actual adaptation to a specific language and culture. Globalization of software is commonly understood to be the combination of internationalization and localization. Globalization starts at the lowest level by using a text representation that supports al

copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1