Jump to content

Multilanguage only for few Pages


ro-bo
 Share

Recommended Posts

Hi everyone.

I'm working on  a site where only a few pages are multilingual. The default language is German. Some pages should be available in English.

Only these pages have a language switcher, depending on whether the english language is activ in the settings for this page.

Nearly everything works fine but if I switch from an page where English language is active to another page where only german language (default) is activated (by page settings) the URL and $user->language is still english although the page should only be available in German. 

I think that leads to double content in Search Engines and other problems in Page view (e.g. some fields in Template have English Content and others are only german).

What's the best approach for this issue?

I currently have it resolved like this:

if (!$page->viewable($user->language)) {
   $user->language = $languages->get('default');
   $session->redirect($page->url, false);
}

How would you do that?
Just by the way: Would the HTTP 302 redirect be OK in this context or is it better to send a HTTP 301 redirect?

Thanks in advance!

Robert

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...