Jump to content

Single-language-section on multilang site


owzim
 Share

Recommended Posts

Hi,

I am trying to install a German-only blog (with Kongondo's Blog Module) on a multi language site, which is making me pull my hair out since I have next to no experience with multilang PW.

The site uses the gateway approach, splitting the url into /en/blahblah and /de/blahblah

English is the default language, so when I post a post, I have those two urls and I have to activate the german version to be even available.

So, I only want /blog/blog-post-title/ without /en/ or /de/ and I don't want the user to have to activate (see checkbox on the screenshot) German version altogether.

How? Thanks!

Screen Shot 2016-07-09 at 01.11.39.png

Link to comment
Share on other sites

Thanks sinnut, i tried that out but I ran into tons of issues with the installations modules compatibility with pw 2.8.x so unfortunately this is no option.

I am having endless issues with the blog module and multilang, so I'll move the discussion there.

Link to comment
Share on other sites

  • 6 months later...

I have the same challenge now on a multilang site. Using PW 3.0.42 with the default multi-language setup.

A certain branch of the page tree should act as a kind of microsite, with different templates etc. But only in the default language (English).

As far as I understand I’d “only” have to disable the automatic redirect from domain.com/microsite to domain.com/en/microsite – which is obviously a default feature of the multi-language setup – for the specific branch. I guess this feature is hidden somewhere in the LanguageSupport core module. So it should be hookable (since pretty much everything in PW is hookable).

Anyone has a deeper understanding of the LanguageSupport core module and can provide a hint?

Link to comment
Share on other sites

4 minutes ago, Zeka said:

Maybe this module by Adrian is somehow relative to this topic

Currently that module is only designed for removing the multi-language inputs from the backend admin by setting the noLang template option on the fly. I don't have automatic redirection (like @Michael van Laar describes) on the front-end, so I never added front-end support, but if that setting is checked on the front-end as well, then I'd be happy to add support for it.

 

 

Link to comment
Share on other sites

  • 2 weeks later...
On 19.1.2017 at 1:47 PM, Michael van Laar said:

As far as I understand I’d “only” have to disable the automatic redirect from domain.com/microsite to domain.com/en/microsite – which is obviously a default feature of the multi-language setup – for the specific branch.

I took a few minutes to investigate. As far as I understand, the variable $redirectURL in /wire/modulesProcessProcessPageView.module is used to perform the above mentioned redirect (as well as any redirect which is necessary when handling URLs).

In this case the varibale $redirectURL is set in /wire/modules/LanguageSupport/LanguageSupportPageNames.module, between line 202 and line 317.

If it’s possible at all to eliminate the default language’s name segment from the URLs of pages of a specific tree branch – which is something @ryan or someone knowing the core really well could tell –, writing a hook that alters $redirectURL before it is used would be the direction I’d think of. But since I still haven’t had much time to learn more about the different hooks, this is only a guess.

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...