|  | 
| 8 | 8 | <!ENTITY RFC3986 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.3986.xml"> | 
| 9 | 9 | <!ENTITY RFC4627 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.4627.xml"> | 
| 10 | 10 | <!ENTITY RFC5322 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5322.xml"> | 
|  | 11 | +<!ENTITY RFC5646 SYSTEM "http://xml.resource.org/public/rfc/bibxml/reference.RFC.5646.xml"> | 
| 11 | 12 | ]> | 
| 12 | 13 | <?rfc toc="yes"?> | 
| 13 | 14 | <?rfc symrefs="yes"?> | 
|  | 
| 997 | 998 | 
 | 
| 998 | 999 |             </section> | 
| 999 | 1000 | 
 | 
|  | 1001 | +            <section title='"defaultLocale", "locales", and "localeKey"'> | 
|  | 1002 | + | 
|  | 1003 | +                <section title="Valid values"> | 
|  | 1004 | +                    <t> | 
|  | 1005 | +                        The value of "defaultLocale" MUST be a valid <xref target="RFC5646">RFC 5646</xref> | 
|  | 1006 | +                        language tag or it will default to "en". Its value (including the case | 
|  | 1007 | +                        where the default "en" is assumed) MAY also be present as a property on the | 
|  | 1008 | +                        "locales" object or otherwise, it will be assumed to be indicating the language | 
|  | 1009 | +                        used on keywords such as "title" directly present on a schema object. | 
|  | 1010 | +                        "localeKey" MUST be a string and MUST also be present as a property on the | 
|  | 1011 | +                        language tag subobject indicated by "defaultLocale" on the "locales" object. | 
|  | 1012 | +                        "locales" MUST be an object whose property names are valid | 
|  | 1013 | +                        <xref target="RFC5646">RFC 5646</xref> language tags and whose value is an | 
|  | 1014 | +                        object, and these language tag subobjects MUST have properties whose names are | 
|  | 1015 | +                        any string and whose value is an object which MAY contain any of the | 
|  | 1016 | +                        following properties: "title", "description", "default", "pattern", and "enum", | 
|  | 1017 | +                        whose values must be valid values for the JSON Schema keywords of the same | 
|  | 1018 | +                        name. | 
|  | 1019 | +                    </t> | 
|  | 1020 | +                </section> | 
|  | 1021 | + | 
|  | 1022 | +                <section title="Purpose"> | 
|  | 1023 | +                    <t> | 
|  | 1024 | +                        These keywords are used for internationalization (i18n). When "localeKey" | 
|  | 1025 | +                        is present on a schema, a locale lookup SHOULD be made by the application | 
|  | 1026 | +                        unless the "defaultLocale" value matches the application-determined user locale, | 
|  | 1027 | +                        in which case, the normal treatment of keywords such as "title" MUST occur. | 
|  | 1028 | +                        If a locale lookup is made, the application-determined user locale MUST match | 
|  | 1029 | +                        a property of "locales", and one of these subobject properties SHOULD | 
|  | 1030 | +                        be matched by the value of "localeKey". Upon finding a match, the application | 
|  | 1031 | +                        MUST override the normal behavior of the following keywords (whether already | 
|  | 1032 | +                        present as keywords or not) with the corresponding properties on the | 
|  | 1033 | +                        "localeKey"-matched object: "title", "description", "default", "pattern", | 
|  | 1034 | +                        and "enum". If no match is found, the "defaultLocale" MUST be used to | 
|  | 1035 | +                        find a match from a locale lookup, similarly overriding behaviors upon any | 
|  | 1036 | +                        match while reporting a failure to the application if no match is found. | 
|  | 1037 | +                        When "localeKey" is not present, the keywords, if present, will retain | 
|  | 1038 | +                        their normal behaviors. | 
|  | 1039 | +                    </t> | 
|  | 1040 | + | 
|  | 1041 | +                    <t> | 
|  | 1042 | +                         "defaultLocale" and "locales" MAY be used in root schemas while "localeKey" | 
|  | 1043 | +                         MAY be used on root schemas and in any subschemas. | 
|  | 1044 | +                    </t> | 
|  | 1045 | +                </section> | 
|  | 1046 | + | 
|  | 1047 | +            </section> | 
|  | 1048 | + | 
| 1000 | 1049 |             <section title='"default"'> | 
| 1001 | 1050 | 
 | 
| 1002 | 1051 |                 <section title="Valid values"> | 
|  | 
| 1325 | 1374 |             &RFC3986; | 
| 1326 | 1375 |             &RFC4627; | 
| 1327 | 1376 |             &RFC5322; | 
|  | 1377 | +            &RFC5646; | 
| 1328 | 1378 |             <reference anchor="ecma262" | 
| 1329 | 1379 |             target="http://www.ecma-international.org/publications/files/ECMA-ST/Ecma-262.pdf"> | 
| 1330 | 1380 |                 <front> | 
|  | 
0 commit comments