Jump to content

[Solved] Impossible to return Processwire to english?


Hurme
 Share

Recommended Posts

Hello,

I'm unable to return Processwire back to english.

Here are the steps I took:

1) I added Finnish language pack on the default language, as the site will be in Finnish
2) I then added a second language and left it empty, in hopes I could use it with my own profile to keep the backend in English. This does not work! Some of the menu items do return to English, but all of the module names and descriptions as an example are still in Finnish. This is a huge pain in the ass as it makes finding modules and reading the descriptions very difficult and confusing when I'm used to using PW in English. 
3) I deleted all the Finnish translation files from default, and put them into the newly create language instead. This does not work either. The backend remains a mismatch of English/Finnish when language is set to English. If I set it to Finnish then everything works (e.g. everything is in Finnish).

So what gives?

Although I love Processwire, I'm also extremely frustrated with how the language is being handled. Half the time it just doesn't work, and don't get me started about setlocale which after dozens of hours of reading through the forums remains a mystery and will not work no matter where I set it and what values I try to use. Compared to other CMS's I've used, PW's language handling extremely difficult and obscure.

Link to comment
Share on other sites

First part...

A quick test (ProcessWire 3.0.123 and FI 1.0.0) where I exactly did what you described and... it worked as expected.

  1. Added FI language pack to default
  2. Logout / Login
  3. Admin in finnisch
  4. Deleted all language files in default
  5. Logout / Login
  6. Admin in english again

There were no mixed translations in the backend at all.

Please try to log out and log in again. That sometimes helps with language hiccups. Or even clear browser cache including cookies / try another browser.

 

Second part...

1 hour ago, Hurme said:

I'm also extremely frustrated with how the language is being handled

Have had the same feelings about language handling at the beginning. But after ~20 multi-lang installations and lots of hours playing around with it my feelings changed.

1 hour ago, Hurme said:

Half the time it just doesn't work

Works ~95% of the time I need it.

1 hour ago, Hurme said:

don't get me started about setlocale which after dozens of hours of reading through the forums remains a mystery and will not work no matter where I set it and what values I try to use.

Never had any real issues with it. 

1 hour ago, Hurme said:

Compared to other CMS's I've used, PW's language handling extremely difficult and obscure.

WordPress: total fail
Drupal: maybe it changed but a few years back it was quite painful
Typo3: never seen a multilanguage setup that worked well
Textpattern: mh... nope
Silverstripe: can't really remember if it worked that well

To be honest... I'm super biased in terms of ProcessWire as it gave me so much options and kind of freedom in the past to get almost everything done right from the start.

But nonetheless I can't remember any real issues with multi-language setups, neither in front-end, nor in the backend.

2019-04-08 17_58_30.png

2019-04-08 17_57_41.png

  • Like 6
Link to comment
Share on other sites

I tried logging out multiple times during the process, but no go.

In the end I wiped the installation and started from scratch, and this time it worked properly. I'm not sure what went wrong on the first time. Don't get me wrong though, PW is hands down my favorite CMS. After 10+ years of suffering with Joomla and occasional WP and Drupal installations, it's very welcome change indeed.

@wbmnfktr Setlocale is a big mystery for me. When you read the forums, you find a lot of different information. "Set it in config, no you must set it in _init, no this third place is the one that worked for me". Even after setting it per language in the backend, Processwire will often relentlessly keep popping up the notification that you must set setlocale correctly. I've finished now perhaps 10'ish PW sites, and sometimes it works and sometimes it doesn't.

@horst Cheers, I'll keep this in mind.

  • Like 3
Link to comment
Share on other sites

That's indeed kind of a strange behaviour.

What setup do you use?  Laragon, XAMP,...

It could be interesting to spot the root of what's causing those problems. I had once problems with Laragon while re-using previous used database names. But that's long time gone now.

Regarding that setlocale mistery... there will be an upcoming multilang project and I will keep an eye on it. But for now I really can't remember any issues.

 

Link to comment
Share on other sites

I'm not sure if we are talking about the same thing, but I remember having a similar issue. To get rid of that message, I had add this to my config.php

// I receive a warning when visiting the admin area
// Warning: your server locale is undefined and may cause issues. Please add this
// to /site/config.php file (adjust “en_US.UTF-8” as needed): setlocale(LC_ALL,'en_US.UTF-8');
setlocale(LC_ALL,'en_US.UTF-8');

 

Link to comment
Share on other sites

Cheers @jens.martsch, I'll take a look at your script when I have the time. 

@wbmnfktr Currently I'm not entirely sure, as I didn't set up the local dev myself. But it is Apache based. Something run by the QNAS we have here. These kinds of things pop up every now and then, even though mostly things work as they're supposed to. I should try to keep more organised notes on when it happens, PW versions, PHP settings and so on.

@gmclelland That is what I am doing. It's also set per language in the PW translations. This problem seems to happen every few installations, but not all the time by any means. Which makes it all the stranger.

Link to comment
Share on other sites

@jens.martsch I tried your "Test for setlocales" code, but it returned nothing on all of the langues (include Finnish which I added). I'll have to try it again once the site is actually deployed on the real server. My current installation is nagging about the set locales on every login, but I'm not very optimistic about finding out what's causing all this.

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