Dharma Posted July 9 Posted July 9 Hello dear community I'm into the development of a new website that must serve different contents for different countries besides of languages. In a previous project I've already solved this task by creating a country selector and then set the chosen country in session (see https://www.univetsafety.com/en/countries/) Using the Repeater Matrix i've then created a new field with checkboxes for countries and for each repeater item the user is able to choose in which country the item should be shown. Everything good and fine, anyhow in this new project i'd love to get rid of session and use URLs to set current country – Eg: www.domain.tld/en/uk/page-slug (where en is the current language and uk is the current country) Of course i'll have several languages (en, it, de, fr, jp, …) and just want to keep them working as usual. I've tried different ways, but none seems to work: - url hooks - module which modifies language slug to use /en-uk/ Any ideas?
MrSnoozles Posted July 14 Posted July 14 Hi @Dharma, I haven't done this myself yet, but I would look into hooking PagesRequest::getPage . Also check how LanguageSupportPageNames.module is hooking into that method, and get an idea of what it's doing to figure out how to overwrite the behavior. 1
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