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

Gabor Hojtsy gabor at hojtsy.hu
Thu May 3 08:22:12 UTC 2007


Florian Loretan wrote:
> The t( ) mechanism is very simple but in a few cases like the one you 
> mentioned (1st, 2nd, 3rd, nth...) it does create some issues that make 
> it impossible to have a correct translation. Another case is for months 
> translation, where the abbreviation for "May" is "May", so that in 
> languages where that month is longer (like in Italian "Maggio") there 
> can't be both a full month name and an abbreviation.
> 
> One option would be change the t( ) mechanism so that its input is a key 
> instead of the English translation. In most cases, the key would be the 
> English translation as it currently is, but it would also be possible to 
> set the key of a message to be different from the English value. For the 
> example mentioned above we would have:
> 
>   'may_short' => ('en' -> 'May', 'it' -> 'Maggio' )
>   'may_long' => ('en' -> 'May', 'it' -> 'Maggio' )
> 
> This change would make drupal's translation mechanism less 
> English-centric. There's of course some issues with these modifications, 
> mainly knowing what the best way to specify keys/messages is, but it 
> would probably make things more adaptable languages other than English, 
> which seems to be one of the big focuses of the 6.x release.

How would that map to the gettext toolchain we/you use?

Gabor


More information about the development mailing list