[development] Translatable strings for 1st/2nd/3rd/nth
kkaefer at gmail.com
Thu May 3 14:56:24 UTC 2007
> Are there existing math libraries that might help? Simple solution
> might be a SQL table that you add the exceptions to 'th' to. So
> the translation for 1 would contain 1st and the translation for 2
> would 2nd and your 'th' default would be suffixed for everything else.
This doesn't work like you imagine it: Different language have
completely different concepts of ordinal numbers. In some cases, they
even depend on the genus (other languages have > 1 grammatical genus)
of the word. In French for example, you say "mon 1er chat" (my 1st
cat) but "ma 1ère souris" (my first mouse). In German, the short form
of ordinal numbers is constructed by simply adding a dot to the
number: "meine 1. Katze" and "meine 1. Maus".
Different genera are already a problem with translation variables,
for example, take the string: "Your %post has been created." where %
post is a content type name. Now the problem is, that "Artikel" (=
article) is masculine while "Umfrage" (= poll) is of female gender.
You can't write "Der %post wurde erstellt." because "Der" is the
masculine article while "Umfrage" would require "Die" instead of "Der".
Konstantin Käfer – http://kkaefer.com/
More information about the development