[Rt-devel] Fwd: Changing digits

Mostafa Hajizadeh mostafa.h at gmail.com
Sat Aug 22 07:42:16 EDT 2009


I accidentally sent it to the wrong address. Sending again.


---------- Forwarded message ----------
From: Mostafa Hajizadeh <mostafa.h at gmail.com>
Date: Thu, Aug 20, 2009 at 12:15 PM
Subject: Re: [Rt-devel] Changing digits
To: Jesse Vincent <jesse at bestpractical.com>
Cc: rt-devel-request at lists.bestpractical.com


Hi Jesse,

In some applications, everything's done at the module that loads
translations and renders variables into messages. We usually add a few
lines of code to that section. (In Perl it's just tr/0-9/۰-۹/)

The part that renders variables into messages (like %1 in "%1
tickets") checks for the language and if it's "fa" changes the digits
of the number variables from default to Persian.

I guess that's the way that it should be done for RT too, but since RT
is using a templating system I don't know where all these things
happen. I tried changing digits at Interface::Web::loc, but it doesn't
change all the numbers because some numbers aren't passed to
the loc. (They're just numbers, no text.)

FYI, there was a game which had 10 messages for "0" to "9" that would
be translated by the translator! I don't remember exactly, but I guess
it was Frozen Bubble!

Mostafa

On Thu, Aug 20, 2009 at 4:53 AM, Jesse Vincent<jesse at bestpractical.com> wrote:
>
> Hi Mostafa,
>
> On Wed 19.Aug'09 at 14:09:53 +0400, Mostafa Hajizadeh wrote:
>> I've translated RT for Persian, but the numbers are still printed out
>> with English digits. Is there anywhere in the code that I can convert
>> all the digits?
>
> ...that's something I've never actually dealt with in app development.
> Can you point me at how some other opensource projects do this?
>
>>
>> Cheers,
>> Mostafa
>> _______________________________________________
>> List info: http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-devel
>>
>


More information about the Rt-devel mailing list