Commit f7cab3d3 authored by Sebastien Robin's avatar Sebastien Robin

2009-10-09 Seb

* Keep user prefered language while switching to another place

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29520 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 53b03262
......@@ -56,7 +56,18 @@
<value> <string>"""\n
Get TioLive Site root URL.\n
"""\n
return context.REQUEST.get(\'BASE0\', \'https://www.tiolive.com\')\n
root_url = context.REQUEST.get(\'BASE0\', \'https://www.tiolive.com\')\n
language = context.Localizer.get_selected_language()\n
\n
# This is far from perfect, to add language all the time\n
# in the url, because default languages of\n
# websites are usually not included in the url. But this\n
# script is also used in tiolive instances, and from them\n
# it is impossible to have the configuration of the web site\n
if language is not None:\n
root_url = "%s/%s" % (root_url, language)\n
\n
return root_url\n
</string> </value>
</item>
<item>
......@@ -95,6 +106,9 @@ return context.REQUEST.get(\'BASE0\', \'https://www.tiolive.com\')\n
<tuple>
<string>_getattr_</string>
<string>context</string>
<string>root_url</string>
<string>language</string>
<string>None</string>
</tuple>
</value>
</item>
......
45
\ No newline at end of file
46
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment