0

My multilingual site has three sets of (anonymous or logged-in) users: public, set1 and set2. They will all get the same site structure, but set1 or set2 will see slightly different content on some pages. Each group will be given a URL: http://example.com/mysite for public, and http://example.com/mysite/set1 or http://example.com/mysite/set2 for the others.

I can use the Views module with the Context module to help decide what content to show on the pages, but I need a way for the URL to retain, for example, "set1" in the URL path as they navigate around.

I tried Sites (which uses PURL), but it doesn't work with Internationalization: it prefixes the site name before the language, so when clicking the language selector back and forth, you can end up with page not found and a broken menu at http://example.com/mysite/set1/en/fr/fr/fr/en/en/en/en!

Is it possible to use Sites with i18n?

Or should I use another approach?

0

You cannot use the PURL "path" method with i18n (Internationalization) because it conflicts with i18n outbound url rewrites - specifically the detection and maintaining of region and language using the path.

I'm not sure if PURL domain and query string methods will still work.

I too am looking at this because I have a project where we've used PURL to maintain a brand identifier with the commerce module, but we want to also use i18n in future. I've used i18n and Domain Access modules before, both separately and together and they play well. Domain Access though is not what you want.

My suggestion would be to treat your "set1" and "set2" like regions. The i18n module lets you specify a region and language that is detected from the path. This is so you can have things like

  • Germany with German (DE-de)
  • Germany with French (DE-fr)
  • Germany with English (DE-en)
  • United States with Spanish (US-es)
  • United States with English (US-en)
  • etc.

So, in these examples we have a country-code and then a language. The i18n module allows you to detect first the country code as a region and the language code for language and then customise the settings based on both.

I would suggest you use this method to specify custom languages where you have a "set1" for region and a standard language code for language, defaulting to English where no language is defined (ie. LANGUAGE_NONE).

I'm going to give this a go myself for my project. I'll let you know how I go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.