Jump to content

Recommended Posts

Posted

hi guys, I have a project which is about to get live and it has two languages:

default: englisch

second: german

Unfortunatelly translation of content will not be done in English for the launch. How can I simply redirect EVERY person that is not logged in to the German version of a page? 

Once everything has been translated I will delete the redirect and everything should be fine. It would be great to have a redirect only for not logged in users so the editor can check how the site looks like when adding the translations.

Any idea?

thanks Sascha

Posted

// set new default language

$default = $languages->get('german');

// redirect

if (!$user->isLoggedin() && $page->localUrl($default) != $page->url) $session->redirect($page->localUrl($default));

  • Like 4

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
×
×
  • Create New...