I am not sure I understand the details but you can mimic the behaviour
this way:
language_info=str(T('english.xml'))
### the use the web2py internationalization page to translate
english.xml into french.xml, etc. for the languages you support. The
":" here is a just a strick to remind you that the string serves an
auxiliary purpose and is not meant for display.
Then use where you like open(os.path.join
(request.folder,'private',language_info)).read()
You must create the english.xml, etc. files that you need for each
language you support. They do not have to be .xml. You can put
whatever you want in there.
Do I make sense?
Massimo
On Feb 13, 11:01 am, Yannick <[email protected]> wrote:
> Hello mate,
>
> I have a question about the internationalization... In Java using
> Struts for example in the JSP file we have something like:
> <bean:message key="language.info" />
>
> And inside the resource application "resources.application_fr" or
> "resources.application_En" we have an entry for index.info so that
> when we switch the language from French to English the appropriate
> entry is there... the entry can be something like for example:
> in resources.application_fr file: language.info = "Francais"
> in resources.application_en file: language.info = "English"
>
> I was wondering if there is such a mechanism in Web2py... Is there
> such thing like <bean:message Key=...> ??
> If yes how to do the same with Web2Py.
>
> Please let me know what you think.
> Thank You !
> Cheers,
> Yannick P.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---