# Locale files - script variants

**URL:** <https://discourse.citationstyles.org/t/locale-files-script-variants/1145>\
**Category:** CSL Development\
**Created:** [November 29, 2012, 3:32am UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145 "2012-11-29T03:32:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rintze\_Zelle](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/rintze_zelle/32/175_2.png) [@Rintze\_Zelle](https://discourse.citationstyles.org/u/Rintze_Zelle)\
**Post date:** [November 29, 2012, 3:32am UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/1 "2012-11-29T03:32:56Z")

</div>

A user wishes to contribute a Latin variant of the Serbian CSL locale  
file (in addition to the existing Cyrillic variant). See

> <https://github.com/citation-style-language/locales/pull/46#issuecomment-10813711>

Is it acceptable to add a script subtag to the locale file name and  
xml:lang value? E.g. “locales-sr-RS-Latn.xml” (for Latin) and  
“locales-sr-RS-Cyrl.xml” (for Cyrillic) (I guess we could omit the  
script subtag from one variant, e.g. we could keep the Cyrillic  
variant as “locales-sr-RS.xml”). See also  
[http://www.w3.org/International/articles/language-tags/Overview.en.php#script](http://www.w3.org/International/articles/language-tags/Overview.en.php#script)

Rintze

---

<div class="post-metadata">

**Author:** ![Avram\_Lyon](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@Avram\_Lyon](https://discourse.citationstyles.org/u/Avram_Lyon)\
**Post date:** [November 29, 2012, 4:14pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/2 "2012-11-29T16:14:34Z")

</div>

I know that Frank built citeproc-js to be aware of BCP 47 semantics, which  
are used extensively in MLZ, but can we do this without demanding the same  
of other processors?

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 29, 2012, 8:35pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/3 "2012-11-29T20:35:19Z")

</div>

> I know that Frank built citeproc-js to be aware of BCP 47 semantics, which  
> are used extensively in MLZ, but can we do this without demanding the same  
> of other processors?

Avram,

I think that in locale filenames, citeproc-js will only handle the  
first two elements of a tag at the moment. What sort of syntax do you  
have in mind?

Frank

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 29, 2012, 9:09pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/4 "2012-11-29T21:09:40Z")

</div>

Off-list, Rintze and I came to the conclusion that a processor can  
just treat the RS-Latn pair as a single tag, with the same fallback  
behaviour as a single element. In this case, sr-RS-Latn would fall  
back to plain-vanilla sr, with whatever default mapping defined for it  
in the processor (so sr-RS). That covers script variants under the RFC  
5646 specificaton, and should be simple to implement in processors.  
citeproc-js needs a small adjustment to handle the filename in that  
case, but it should be easy to do.

So I’m fine with including the file in the repo, if others are happy with it.

Frank

---

<div class="post-metadata">

**Author:** ![Bruce\_D\_Arcus1](https://avatars.discourse-cdn.com/v4/letter/b/4bbf92/32.png) [@Bruce\_D\_Arcus1](https://discourse.citationstyles.org/u/Bruce_D_Arcus1)\
**Post date:** [November 29, 2012, 9:13pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/5 "2012-11-29T21:13:11Z")

</div>

Minor thing: shouldn’t file names be lower-case generally?

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 29, 2012, 9:16pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/6 "2012-11-29T21:16:29Z")

</div>

I’ll defer to others on filenaming conventions, but RFC 5646 language  
tags are not case sensitive, so there would be no problem with  
lowercasing as far as the specification is concerned.

---

<div class="post-metadata">

**Author:** ![Avram\_Lyon](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@Avram\_Lyon](https://discourse.citationstyles.org/u/Avram_Lyon)\
**Post date:** [November 29, 2012, 9:16pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/7 "2012-11-29T21:16:53Z")

</div>

Here, we run into a conflict with the standards for the language tags,  
which are generally cased in a particular way.

---

<div class="post-metadata">

**Author:** ![Frank\_Bennett](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.citationstyles.org/frank_bennett/32/198_2.png) [@Frank\_Bennett](https://discourse.citationstyles.org/u/Frank_Bennett)\
**Post date:** [November 29, 2012, 9:25pm UTC](https://discourse.citationstyles.org/t/locale-files-script-variants/1145/8 "2012-11-29T21:25:47Z")

</div>

Here is the language from RFC 5646:

The ABNF syntax also does not distinguish between upper- and  
lowercase: the uppercase US-ASCII letters in the range ‘A’ through  
’Z’ are always considered equivalent and mapped directly to their US-  
ASCII lowercase equivalents in the range ‘a’ through ‘z’. So the tag  
"I-AMI" is considered equivalent to that value “i-ami” in the  
’irregular’ production.

Although case distinctions do not carry meaning in language tags,  
consistent formatting and presentation of language tags will aid  
users. The format of subtags in the registry is RECOMMENDED as the  
form to use in language tags. This format generally corresponds to  
the common conventions for the various ISO standards from which the  
subtags are derived.

So Avram and I are not at odds. For readability, you would adhere to  
the convention of using uppercase.

Frank
