On Dec 15, 8:56 am, Andrea Cappelli <[email protected]> wrote:
> Hi List,
> I'm a web2py user since few months and now I'm dealing with 2 problems
> regarding translations
>
> 1) With latest release (1.74.1) I get no sentence translated. I have 2
> files in languages/ (en.py and it.py) and some symlink (en-us.py, en-
> gb.py, it-it.py), but i receive always the text in Italian (the
> language used as T argument).

We had a long discussion about this. We had a minor change of behavior
that basically assumes the default language is English. We did not
make such assumptions before. I opposed such change but apparently I
was the only one and everybody else spoke for it. Now you have to be
explicit about the fact that your language is Italian (somewhere
before you use T):

   T.current_languages=['it','it-it']


> 2) If I use the old 1.65.1 (rev 992) all seems to work properly, but I
> have another problem. I wrote a python script to completely wget all
> pages (production server doesn't have python, so i have to put on it
> only html/css/js) and always works if I have only one language. If I
> have both en.py and it.py strange behaviour appear. The most annoying
> thing is that the language file is "corrupted" by web2py, in it i can
> see a comment reporting that the file is utf8 and an open curly
> bracket ( '{' ).
> Seems that web2py opens the file but for some reason fail when write
> to it

This may be a concurrency issue. Make sure you lock the file while
writing in it from a your own python program.

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to