I think u can create a file en_US or en_GB manually

Alexandre Andrade

2012/1/13 Niphlod <niph...@gmail.com>

> Hi,
>   I'm currently researching the possibility to add some translations
> using the T helper in a different way then usual.
>
> Let's say that I wrote all the strings to be translated in english,
> and use T for the italian translation.
>
> Until here, no problem found....
>
> Then, I tried to use a string, like "DEFAULT_CURRENCY", that has to be
> translated BOTH in english and italian, using the T helper.
>
> I have two languages files, en.py and it.py, in en.py there is the
> translation "DEFAULT_CURRENCY" --> "USD", in it.py the one
> "DEFAULT_CURRENCY" --> "EUR".
>
> Now, let's enter the shell..
>
> >>> print T("DEFAULT_CURRENCY")
> DEFAULT_CURRENCY
> >>> print T("DEFAULT_CURRENCY", language='it')
> EUR
> >>> T.current_languages
> ['en']
> >>> #hey, any language in current_languages don't use T, as said into the
> docs
> >>> #let's force this list with arabic (alphabetical order merit, don't
> blame me :D)
> >>> T.set_current_languages('ar')
> >>> T.current_languages
> ('ar',)
> >>> print T("DEFAULT_CURRENCY", language='it')
> EUR
> >>> print T("DEFAULT_CURRENCY", language='en')
> DEFAULT_CURRENCY
> >>> #umpf
> >>> T.force('en')
> >>> print T("DEFAULT_CURRENCY", language='en')
> DEFAULT_CURRENCY
> >>> #multi-umpf!
> >>> print T("DEFAULT_CURRENCY")
> USD
> >>> #finally ...
>
> am I the only one seeing something going wrong behaviour? Why do I
> have to force translation to english if T.current_languages don't
> include "en" to get the translation in english ?
> Is this the wanted behaviour ?
>
>
>


-- 
Atenciosamente


Alexandre Andrade
Hipercenter.com Classificados Gratuitos

Reply via email to