Jump to content

Frontend Language Issue (default/name)


Inxentas
 Share

Recommended Posts

Ok, so I have been reading up on how to "change the default language" in Processwire and most tips mentioned to change the Guest user's language to the one you'd want. Unfortunately, this does not work well for me. In fact, when I var_dump the contents of $user->name,$user->language->name I get different results depending on where I am in the site. I have set the language of user Guest to the new manually created language Dutch (nl).

  • Not being logged in and visiting the root, results in the language name being default.
  • Not being logged in and visiting another page, the results in the language name being nl.

I am at a loss of why this happens but it's preventing me from setting the Guest users language to determine which language should be shown when not logged in, because the homepage ALWAYS reverts to the deault language which is NOT the one set for the Guest user. This is processwire 2.5.3.

So... when my client asks me to change the default language of an already existing website, how do I do this without having to re-organise the whole language stuff? Imagine that this client can't make up his mind and wants to be able to change the language in which the site opens about every three months. Is this possible or am I doomed to go through the whole "upload Dutch language files into the Default language"-thing?

  • Like 1
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...