A.Schmidt Posted August 1, 2016 Share Posted August 1, 2016 Hello, I have a problem with the default language of the "guest" user. After changing it from "default" to any another language and open the "Home" page (I filled out its fields in 2 languages), the page is still shown in default language. Neither the translated version is shown nor a redirect to the localized version happens. When I set names for each language's version of the Home page and open for example "http://localhost:8888/de" the correct localized version is shown. What am I doing wrong? Link to comment Share on other sites More sharing options...
arjen Posted August 1, 2016 Share Posted August 1, 2016 Did you view the website in an incognito screen/private mode to make sure you are not logged in by accident? 3 Link to comment Share on other sites More sharing options...
A.Schmidt Posted August 2, 2016 Author Share Posted August 2, 2016 Yes, I checked it in incognito mode. Here is what I did: Blank install. I also tried the "site-languages" installation template, same problem here Modules "Languages Support", "Languages Support - Fields", "Languages Support - Page Names" and "Languages Support - Tabs" installed (in correct order) Added new language named "de" in "Setup" / "Languages" Changed type of field "title" to "PageTitleLanguage" Edited page "Home" and entered "Startseite" in new language tab Edited PHP Template "basic-page.php" to prove that user is guest Now I open the procject's admin area a new incognito browser session. After login, Home page looks like that: After logout and a browser restart, I open the homepage in a incognito window again: That's ok, because guest still having default language set. Now I change the default language of the "guest" user in the backend: Logout, browser restart... Then I load the Home page again and it's still english (default): To be sure that the german version works, I enter a name for the german home page in the Pw backend: Now when I open the URL (Logout, Browser restart...) adding "/de" to the URL, the correct version is shown: I do not know what's wrong. My collegue tested a Processwire installation in Windows by XAMPP, I use a Debian 8 Vagrant Box. We also tested older versions of Processwire, we could not get it work in any version Link to comment Share on other sites More sharing options...
szabesz Posted August 2, 2016 Share Posted August 2, 2016 Others with more experience in this field might correct me, but I do not think that Admin -> Access -> Users -> guest -> Language is for changing the default language of the frontend. It is for backend only. Since a guest user cannot access the backend, it is kinda useless in this case. But I might be mistaken. Anyone else? 2 Link to comment Share on other sites More sharing options...
Sergio Posted August 2, 2016 Share Posted August 2, 2016 @szabesz is correct. The language option on the User is for the backend access only. @A.Schmidt your setup is correct. When the guest user access the homepage using just "/' Processwire will show the default language, in this case, English. Using "/de" will show German. This is how PW works. And there is no redirect either. If you want to redirect based on browser settings and other stuff, there is a module for that . But I don't recommend it as it a UX flaw in most cases, so you have to be careful. 3 Link to comment Share on other sites More sharing options...
szabesz Posted August 2, 2016 Share Posted August 2, 2016 Thanks @Sérgio ! @A.Schmidt Recommended searches on the subject: allintext: language site:ProcessWire.com/blog site:processwire.com/talk default language 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now