Rename default-locale to force-locale?

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

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

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)?
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:

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
)? 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