Say you have this action

    def index(): return(message="Hello world")

first you markup the string

    def index(): return(message=T("Hello world"))

then you go the admin|design|languages and you create a language file
for every language you want to create. For example for italian, it
would be "it-it.py"

When you edit the file if will ask you to translate all the marked up
strings.

To see the app translated set your browser to set accept-language: it-
it

For debugging purpose you may want to add to your model

    if request.vars.force_language:
session.language=request.vars.force_language
    if session.language: T.force(session.language)

then you can test it with

http://..../index?force_language=it-it

Massimo




On Feb 22, 11:58 pm, Jason Brower <[email protected]> wrote:
> I see the feature, I know the theory, but I can't seem to find
> documentation on how to start using it in my application.
> For example, I want to create a menu where I can select the language
> that the session will use.
> Regards,
> Jason Brower
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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