why not create the language selector like in admin page? store the language
value in cookie
something like:
*db.py*
*# set the language
*
*if 'language' in request.cookies and not (request.cookies['language'] is
None):*
* T.force(request.cookies['language'].value)*
*default/layout.html*
<!-- Footer ================================================== -->
<div class="row">
<footer class="footer span12" id="footer">
<div class="footer-content">
{{block footer}} <!-- this is default footer -->
<div class="copyright pull-left"></div>
<div id="poweredBy" class="pull-right"></div>
<center><span>{{=T('Copyright')}} ©
{{=request.now.year}}
* {{if hasattr(T,'get_possible_languages_info'):}}*
* - </span>*
* <select name="language" onchange="var date = new
Date();cookieDate=date.setTime(date.getTime()+(100*24*60*60*1000));document.cookie='language='+this.options[this.selectedIndex].id+';
expires='+cookieDate+'; path=/';window.location.reload()">*
* {{for langinfo in sorted([(code,info[1]) for code,info
in T.get_possible_languages_info().iteritems() if code != 'default']):}}*
* <option {{=T.accepted_language==langinfo[0] and
'selected' or ''}} {{='id='+langinfo[0]}} >{{=langinfo[1]}}</option>*
* {{pass}}*
* </select>*
{{else:}}
</span>{{pass}}</center>
{{end}}
</div>
</footer>
</div>
hope this can help
best regards
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.