Jump to content

Multi-Language Support relevant to specific sections


a-ok
 Share

Recommended Posts

Hi folks,

I have a site set up for a festival of events over the next 5 years. Each year (page with children) in the site is in a different location and we want to use the Multi-Language Support to toggle between the native language of the location and English. I have set up the Multi-Language Support stuff fine but the only issue is that it's applying it to the whole site whereas I only need to use specific languages in specific sections.

For example, for a Portuguese section a URL might be http://www.domain.com/pt/designing-respect/home/ whereas I need something like http://www.domain.com/designing-respect/pt/home/ instead and on another section for a Chinese section a URL might be http://www.domain.com/designing-politics/cn/home/ so the language support is being applied to the section rather than all of them to the same whole site.

This is also the case with using multi-language title fields; it's adding all the options to all the pages whereas I need them only on the relevant sections (so within the Chinese section you'd get the English title field and the Chinese title field; not all the language title fields).

Any ideas?

Link to comment
Share on other sites

I think you should use the language alternate field approach instead:

https://processwire.com/api/multi-language-support/multi-language-fields/#language-alternate-field-values

Take a look and came back here to discuss. :)


And for a url like  http://www.domain.com/designing-respect/pt/home/

you can use URL segments to detect the language, in your template, and switch to the language fields.

  • Like 1
Link to comment
Share on other sites

I think you should use the language alternate field approach instead:

https://processwire.com/api/multi-language-support/multi-language-fields/#language-alternate-field-values

Take a look and came back here to discuss. :)

And for a url like  http://www.domain.com/designing-respect/pt/home/

you can use URL segments to detect the language, in your template, and switch to the language fields.

Thanks for this. The 'alternative field approach' is perfect. However, I'm just a bit stuck with having languages set up only specific to certain sections and now the whole site.

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...