Op Saterdag 2008-03-01 skryf Sven Herzberg: > Hi guys, > > I'm currently working on a calendar-like application and want to display > a string for the day like "1st", "2nd", "3rd", "4th". The string has to > stand alone, so please don't try to convince me about using > strftime(3). > > Now my question: is there a properly usable way of doing this? (I think > of a solution like nettext(3).) > > I think I'll go on like this (if no other appropriate solution pops up): > 1. Use a list of strings for the beginning (this is really not much of > an issue as I only have to care about ordinal numbers from 1st to 31st). > 2. (Once I have enough time:) Make up an internal function like > ngettext() and use that. > 3. If everything works out: try to push it into gettext. > > Regards, > Sven
Hi Sven I don't know what nettext is (no man page for that on my system), but I recall that some robot for editing Wikipedia needed this information some time ago, so you might be able to search for that. If I remember correctly, the patterns for Dutch and Afrikaans was quite complex, and for your purposes, I think your option 1 is mostly the only way to go. If we need to do hundreds or thousands of ordinals, there is a pattern, but it only emerges at that scale, sortof :-) Keep well Friedel _______________________________________________ gnome-i18n mailing list gnome-i18n@gnome.org http://mail.gnome.org/mailman/listinfo/gnome-i18n