# Rename default-locale to force-locale?

**URL:** <https://discourse.citationstyles.org/t/rename-default-locale-to-force-locale/810>\
**Category:** CSL Development\
**Created:** [January 11, 2010, 9:04pm UTC](https://discourse.citationstyles.org/t/rename-default-locale-to-force-locale/810 "2010-01-11T21:04:39Z")\
**Posts on this page:** 3\
**Page:** 1

<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:** [January 11, 2010, 9:04pm UTC](https://discourse.citationstyles.org/t/rename-default-locale-to-force-locale/810/1 "2010-01-11T21:04:39Z")

</div>

I’ve just realized something about locale handling that might justify  
the change in the subject line.

In citeproc-js, I’ve set things up so that the processor can either  
take the locale as a runtime option (i.e. by user selection or from  
the surrounding environment), or from the default-locale set on the  
style node. Here is the relevant part of the manual (see the  
description of the lang option):

[http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#csl-engine](http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#csl-engine)

I think this is the behavior that users will expect. Styles that do  
not declare a default would run with whatever locale is requested by  
the surrounding environment, defaulting to English as a last resort.  
Styles that declare their own “default” are pegged to a particular  
locale (as many styles are), and should run with that locale  
regardless of what the surrounding environment requests.

If that behavior is correct, the style node attribute is not providing  
a default value for use as a fallback, but forcing the style to a  
particular locale. In that case, renaming the attribute to reflect  
that might make sense.

Frank

---

<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:** [January 12, 2010, 7:00am UTC](https://discourse.citationstyles.org/t/rename-default-locale-to-force-locale/810/2 "2010-01-12T07:00:41Z")

</div>

Did you check the original thread in which default-locale was introduced (  
[http://sourceforge.net/mailarchive/message.php?msg\_name=3EE7E90B-58C9-465A-9421-E564DD16D427%40simonster.com](http://sourceforge.net/mailarchive/message.php?msg_name=3EE7E90B-58C9-465A-9421-E564DD16D427%40simonster.com))?  
In that discussion, it is assumed that apps (i.e. Zotero) that support  
default-locale also include a way to override the value of default-locale.  
So while English is the fallback when default-locale isn’t set,  
default-locale specifies the locale that should be used by default, unless  
the app overrides that locale via a preference.

RintzeOn Mon, Jan 11, 2010 at 10:04 PM, Frank Bennett \<@Frank\_Bennett\>wrote:

---

<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:** [January 12, 2010, 7:18am UTC](https://discourse.citationstyles.org/t/rename-default-locale-to-force-locale/810/3 "2010-01-12T07:18:55Z")

</div>

> > If that behavior is correct, the style node attribute is not providing  
> > a default value for use as a fallback, but forcing the style to a  
> > particular locale. In that case, renaming the attribute to reflect  
> > that might make sense.
> 
> Did you check the original thread in which default-locale was introduced (  
> [http://sourceforge.net/mailarchive/message.php?msg\_name=3EE7E90B-58C9-465A-9421-E564DD16D427%40simonster.com](http://sourceforge.net/mailarchive/message.php?msg_name=3EE7E90B-58C9-465A-9421-E564DD16D427%40simonster.com)  
> )? In that discussion, it is assumed that apps (i.e. Zotero) that support  
> default-locale also include a way to override the value of default-locale.  
> So while English is the fallback when default-locale isn’t set,  
> default-locale specifies the locale that should be used by default, unless  
> the app overrides that locale via a preference.

Do you have any styles that would be served well by that behavior, but  
wouldn’t be served by what citeproc-js does at the moment? Not  
protesting; I just wonder whether one or the other behavior might make  
better sense in practice.

Frank
