Locally, I implemented this by opening up style-specific localization
of ordinal strings, through the ordinary localization machinery. The
CSL frontmatter contains this:
st
d
d
th
Because these are not registered in the global localization defaults,
other languages fall back to English. The result is that the ordinals
given in the style file (for English only, if that’s all that’s
written in) will take effect for all languages. This seems to work
well for the issue, and shouldn’t step on other styles. The syntax of
the names is extensible as well, which might come in handy if it
proves necessary to support ordinals in languages with more than four
suffixes. The downside, I suppose, is that “localization” has a
slightly different meaning for these terms, and requires a bit of
explanation. But it works smoothly.
Thoughts on this approach as a proposal for inclusion in CSL?
Locally, I implemented this by opening up style-specific localization
of ordinal strings, through the ordinary localization machinery. The
CSL frontmatter contains this:
st
d
d
th
Because these are not registered in the global localization defaults,
other languages fall back to English. The result is that the ordinals
given in the style file (for English only, if that’s all that’s
written in) will take effect for all languages. This seems to work
well for the issue, and shouldn’t step on other styles. The syntax of
the names is extensible as well, which might come in handy if it
proves necessary to support ordinals in languages with more than four
suffixes. The downside, I suppose, is that “localization” has a
slightly different meaning for these terms, and requires a bit of
explanation. But it works smoothly.
Thoughts on this approach as a proposal for inclusion in CSL?
Locally, I implemented this by opening up style-specific localization
of ordinal strings, through the ordinary localization machinery. The
CSL frontmatter contains this:
st
d
d
th
Because these are not registered in the global localization defaults,
other languages fall back to English. The result is that the ordinals
given in the style file (for English only, if that’s all that’s
written in) will take effect for all languages. This seems to work
well for the issue, and shouldn’t step on other styles. The syntax of
the names is extensible as well, which might come in handy if it
proves necessary to support ordinals in languages with more than four
suffixes. The downside, I suppose, is that “localization” has a
slightly different meaning for these terms, and requires a bit of
explanation. But it works smoothly.
Thoughts on this approach as a proposal for inclusion in CSL?
Hello,
How can I make difference between masculin and feminin (German, French,
Romanian etc.)?
In Romanian:
for edition, it’s correct: 1-a, a 2-a, a 3-a
for volume, it’s correct: 1, al 2-lea, al 3-lea
Thanks,
Nicu
Ah, point taken. Gender can be handled using the same approach, by
assigning suffixes to variables explicitly:
st
d
d
th
-al
-lea
-lea
-lea
-a
-a
-a
-a
If, after application of the algorithm, no locale value is found for
the ordinal, the fallback should be to the plain ordinal. In this
case, you would get English as visible breakage.
An interesting case is Swedish, with five ordinal suffixes and largely
arbitrary rules of assignment:
But if wikipedia is to be believed, Swedish publishing appears to use
a simplified set of conventions for abbreviated suffixes, so it looks
like the same schema will cope:
How can I make difference between masculin and feminin (German, French,
Romanian etc.)?
In Romanian:
for edition, it’s correct: 1-a, a 2-a, a 3-a
for volume, it’s correct: 1, al 2-lea, al 3-lea
Thanks,
Nicu
Ah, point taken. Gender can be handled using the same approach, by
assigning suffixes to variables explicitly:
st
d
d
th
-al
-lea
-lea
-lea
-a
-a
-a
-a
Hmm … when implementing this, the ordinal suffixes will need to go
into some sort of array specific to this category of terms. It might
make that task simpler, and make the CSL more readable, if instead of
“term” this used an element “ordinals” that contains several “ordinal”
elements. That would also keep the “variable” attribute out of the
term element, where it has no general purpose.
Revisiting this now from the perspective of implementing CSL, I’m
wondering whether it might make sense to add the term names ordinal-01
through ordinal-04 to the standard CSL locale files.
…
That makes sense to me. Andrea?
Note: I added a :‘long-ordinal’ option over the weekend.
Revisiting this now from the perspective of implementing CSL, I’m
wondering whether it might make sense to add the term names ordinal-01
through ordinal-04 to the standard CSL locale files.
…
That makes sense to me. Andrea?
Note: I added a :‘long-ordinal’ option over the weekend.
A couple of questions on long-ordinal:
Is there an upper limit on the integers that this should handle?
If so, what should be the behaviour when the limit is exceeded?