diff options
| author | Romain Derie <rde@odoo.com> | 2019-03-26 05:56:55 +0000 |
|---|---|---|
| committer | Romain Derie <rde@odoo.com> | 2019-08-26 16:35:19 +0000 |
| commit | 269aa594111a152ad4b7714856ea745bfef57155 (patch) | |
| tree | d5f8f7e86209102d831b2e222038d45bd7fe7626 /addons/website/static/src/js/content/website_root.js | |
| parent | f10f120de3017bc8d0e9a5ac72eeec1280374a1d (diff) | |
[IMP] http_routing, website: allow to customize the lang in URL
With this commit it is now possible to change the lang displayed in the URL.
Eg, you could use `/fr` instead of `/fr_BE`, or even a fancier `/french`.
Task-32838
Courtesy of pla@odoo.com
closes odoo/odoo#35135
Signed-off-by: Romain Derie (rde) <rde@odoo.com>
Diffstat (limited to 'addons/website/static/src/js/content/website_root.js')
| -rw-r--r-- | addons/website/static/src/js/content/website_root.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/website/static/src/js/content/website_root.js b/addons/website/static/src/js/content/website_root.js index 4b61a33d779..a8e208f1408 100644 --- a/addons/website/static/src/js/content/website_root.js +++ b/addons/website/static/src/js/content/website_root.js @@ -105,7 +105,7 @@ var WebsiteRoot = publicRootData.PublicRoot.extend({ var $target = $(ev.target); // retrieve the hash before the redirect var redirect = { - lang: $target.data('lang'), + lang: $target.data('url_code'), url: encodeURIComponent($target.attr('href').replace(/[&?]edit_translations[^&?]+/, '')), hash: encodeURIComponent(window.location.hash) }; |
