Ticket #1653 (closed enhancement: fixed)
Change URLs for multilingual site
Reported by: | ross | Owned by: | toby |
---|---|---|---|
Priority: | awaiting triage | Milestone: | ckan-sprint-2012-03-05 |
Component: | ckan | Keywords: | [4d] |
Cc: | Repository: | ckan | |
Theme: | none |
Description (last modified by ross) (diff)
To support multiple languages we should have an easy way to specify the language as part of the URL, so that URLs are both specific and we also reduce the dependency on the session.
- Analysis [1d] - Find the best way of implementing this and how everyone else does their language URLs.
- Write Middleware + update url_for to take account of the language. [2d]
- Document the language setup, and how to replicate it. [1d]
Change History
comment:2 Changed 2 years ago by kindly
- Owner changed from ross to toby
- Status changed from new to assigned
comment:3 Changed 2 years ago by toby
- Status changed from assigned to accepted
Initial implementation completed.
/en/home - is English /fr/home - is French etc. /home uses site default from development.ini
Requests to default will redirected to a language specific url if the browser requests an available language.
h.url() and h.url_for() amended to use the new url scheme h.url_for_static() added for none language based urls (css, js)
Base templates updated.
IMPORTANT: pylons.url() removed from ckan.lib.base.render() as this allowed the language functionality to be ignored. Broken templates should use h.url() instead of url().