This does not appear to work the string is not translated. Also the following doesn't work either:
T.set_current_languages() T.force('en-us') However, as mentioned above changing this back to: T.current_languages = [] T.force('en-us') Does work On Monday, February 24, 2014 6:45:18 PM UTC-5, Massimo Di Pierro wrote: > Ok. One more try: > > T.set_current_languages() > > > On Monday, 24 February 2014 17:36:10 UTC-6, User wrote: >> >> I added T.current_languages = [] to the end of my model but this did >> nothing. Then I tried: >> >> T.current_languages = [] >> T.force('en-us') >> >> This caused the translated string in en-us.py to show up in the rendered >> html (and also caused the filling of en-us.py with default strings). >> However, I still don't seem to have a solution, because I don't want to >> force the language to be en-us. I want to use whatever the user's >> accept-language is. And in general this already works, except for en-us. >> Thoughts? >> >> >> On Monday, February 24, 2014 8:17:24 AM UTC-5, Massimo Di Pierro wrote: >> >>> I get it now. You need: >>> >>> T.current_languages = [] >>> >>> Otherwise this is set to >>> >>> T.current_languages = ['en'] >>> >>> and it things the current language is english and therefore it does not >>> need translation. >>> >>> >>> On Monday, 24 February 2014 01:45:49 UTC-6, User wrote: >>>> >>>> In fact, if I put an entry in en-gb.py and set my browser >>>> accept-language to en-gb it will correctly pick up this string, but for >>>> some reason it's not picking up the string in en-us (unless I'm doing >>>> something wrong). >>>> >>>> Also interesting to note, is when I view my site with en-gb or es as >>>> the accept lang, web2py seems to automatically modify the en-gb.py and >>>> es.py files with default entries for every default string, whereas it's >>>> not >>>> doing that for en-us.py >>>> >>>> Does this have to with en-us.py being a default or something? >>>> >>> -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.