[development] Translatable strings for 1st/2nd/3rd/nth

Khalid Baheyeldin kb at 2bits.com
Thu May 3 14:49:19 UTC 2007


I can tell you that languages can be so different that even simple
assumptions are no longer valid.

For example, most languages in Europe have a singular and plural,
at least those of Indo European origin. For English, adding "s" or "es"
is sufficient in most cases, and if you want to do a porter stemmer,
you take that out (oversimplifying, but you get the idea).

In Arabic, there is singular, dual and plural. And then there is masculine
and feminine version of each of those. So the assumptions made for
English no longer carries over well to Arabic.

On 5/3/07, Walt Daniels <wdlists at optonline.net> wrote:
>
> I doubt if the "th" concept even exists in many languages. Not being a
> language scholar I can't give explicit examples. It is usually possible to
> word messages so you don't use the "th" concept. This seems like a better
> approach.
>
> -----Original Message-----
> From: development-bounces at drupal.org [mailto:
> development-bounces at drupal.org]
> On Behalf Of Earnie Boyd
> Sent: Thursday, May 03, 2007 8:56 AM
> To: development at drupal.org
> Subject: Re: [development] Translatable strings for 1st/2nd/3rd/nth
>
> Quoting Chris Kennedy <chrisken at mail.utexas.edu>:
>
> > Does anyone have suggestions for creating translatable strings for
> rankings?
> >
> > I need to generate strings for 1st/2nd/3rd/4th/etc. ideally without a
> > limit, but don't know of a simple translatable solution.
> >
> > Right now I just have individual t() strings for 1st/2nd/3rd, then a
> > blanket t($i .'th') for the rest, under the untested theory that
> > translators could manually add translations for Nth into their .po
> > files up to a reasonable limit. I realize that this will not work for
> > extractor.php purposes and is English-centric.
> >
> > Thoughts?
> >
>
> 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.
>
> Earnie
>
>
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.5.467 / Virus Database: 269.6.2/785 - Release Date: 5/2/2007
> 2:16
> PM
>
>
>


-- 
2bits.com
http://2bits.com
Drupal development, customization and consulting.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/development/attachments/20070503/a8ad696e/attachment.htm 


More information about the development mailing list