jacekkowalewski Posted October 9, 2018 Share Posted October 9, 2018 (edited) Hello all. At first I would like to thank ryan for the answer in this post: https://processwire.com/talk/topic/4281-language-switching-using-multiple-domains/ However, I found out that there are some details missing. After setting user language based on subdomain everything runs smoothly (frontend). But there are some little problems on backend: Edit page -> settings -> name: Below languages there are links. They obviously don't work. They are generated using the page name (I suppose), but should be generated using page full URL. Than we should be able to make a hook that override page full URL (remove language name from path, and prepend it as subdomain). This problem occurs in many more places in backend (preview page, many other links) So the idea should be: On backend, ALWAYS use predefined methods to get page full url (everywhere where links are). When trying to implement multilingual sites based on subdomains, overwrite page full url method as You wish When creating language switcher, or everything else, use page full url method. In other words: every URL in the world should be generated using page full url method. If You wish to change any URL based on subdomains or Your own ideas, just hook to this method. This seems realle reasonable, does it? What do You think about it? Or maybe I'm doing something wrong? Thanks a lot for Your support and help. PS. I'm new here, however I love ProcessWire. I'm testing it for few days now, and WOW, I'm impressed. This is my dream coming true! Edited October 9, 2018 by jacekkowalewski Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now