EyeDentify

Warning about Server Locale after update from 3.0.52 > 3.0.53 - Help!

Recommended Posts

Amending the site/config.php file by inserting the following line of code immediately after the opening <?php appears to have resolved the issue:

setlocale(LC_ALL, "en_GB.utf8");

Thanks for everyone's help.

  • Thanks 1

Share this post


Link to post
Share on other sites

Hello,

i was upgrding to PW new master (3.0.61) from old master (3.0.42) and recieved the following warning (have a multilanguage installation -> german and english):

Warning: your server locale is undefined and may cause issues. Please translate the “C” locale setting for each language to the proper locale in /wire/modules/LanguageSupport/LanguageSupport.module (shortcuts provided below):

• English
• German
For example, the locale setting for US English might be: en_US.UTF-8*

 

1. Where exactly in the file LanguageSupport.module (which has some 900 loc) do i translate the C locale setting? - I couldn't find such a setting in this file...

2. Isn't it a bad idea to make changes to a core file, that normally should be overwritten by the next upgrade? Or do i miss something?

 

Thanks in advance.

Share this post


Link to post
Share on other sites

You won't be modifying core files. You'll be working on translation files.

From the top dropdown menu, go to

Setup > Languages > [en/de] > Core Translation Files > Find Files To Translate > (pick language support module) > Submit > replace the values

  • Like 3

Share this post


Link to post
Share on other sites

@abdus thank you very much. That did the trick. I put the values (-> en_US.UTF8 ) without quotation marks in the translation field. Also i saw that there was already a string for the german language (-> de_DE), which i left untouched, but now i think it would be better to change it to de_DE.UTF-8 ...

Anyway i strongly suggest to change the warning messsage to exactly the line you wrote me in your post, because that's clear and easy to grasp, imho.

ok on hindsight - if one has a multilanguage installation - one should know what is meant by "please translate the C locale...", but still, i managed to misunderstand the original message whereas your line is 100% clear.

 

 

  • Like 2

Share this post


Link to post
Share on other sites

Hi, I had the same error after updating to  PW 3.0.61. After putting the values (nl_NL.UTF-8 & fr_FR.UTF-8) in the translation files as @abdus mentioned, I still got the error.
Someone an idea how this can be solved?

Share this post


Link to post
Share on other sites

Placing setlocale(LC_ALL, "en_US.UTF-8") in /site/config.php solved the issue for me, but I am not using the multi language capability.

setlocale

Edited by rick
added link

Share this post


Link to post
Share on other sites

@Pino I am not sure about adding this through $languages or the translation files as I am not using multi languages. I had this error initially upon upgrading and the problem went away after I added the locale setting to the config file. Does you server fall within the PHP notice?

Quote

Warning

The locale information is maintained per process, not per thread. If you are running PHP on a multithreaded server API like IIS, HHVM or Apache on Windows, you may experience sudden changes in locale settings while a script is running, though the script itself never called setlocale(). This happens due to other scripts running in different threads of the same process at the same time, changing the process-wide locale using setlocale().

I don't know if this has anything to do with it though.

Share this post


Link to post
Share on other sites

Adding the setlocale statement is not a hard requirement, but you'd need to live with the pw notice each time you log in. It's been added not because of anything related to multi-language sites, but because of issues with file handling of processwire involving utf-8 characters like cyrillic ones. These can happen on all processwire sites not just multi language ones.

  • Like 3

Share this post


Link to post
Share on other sites

Hi, I figured out why I keep getting the error message, even after following the guidelines.

I needed to enable the locale (in my case: nl_BE.UTF-8) on our Debian VPS

Share this post


Link to post
Share on other sites

Mhm, I could still not make that warning go away by any of the above means (on an English/German multi-lingual site, after upgrading to 3.0.62).

Any other ideas?

Edited by funtoosh
typo

Share this post


Link to post
Share on other sites

Hi @funtoosh, are you shure the locales you need are enabled on your system? Login your Linux server using SSH and type in this command:

 locale -a

 

Share this post


Link to post
Share on other sites

Hi Pino,

unfortunately, I don't have access to a shell on that hosting.

I gather that the message is not severe, though it's still irritating to get on login.

I entered several standard (?) locales, de-DE, C.utf8, de-DE.utf8, en-GB.utf8, the warning persists though.

Any ideas?

Best, -f

Bildschirmfoto 208.png

Share this post


Link to post
Share on other sites
On 14.06.2017 at 1:36 PM, funtoosh said:

I entered several standard (?) locales, de-DE, C.utf8, de-DE.utf8, en-GB.utf8, the warning persists though.

Any ideas?

Best, -f

Bildschirmfoto 208.png

There is some bug with links provided in this warning message. I also struggled with this for some time until I made "C" translation manually through language panel.

Setup -> Languages ->  [ your language ] -> Find files to translate -> In "Translatable files in /wire/" -> "/modules/LanguageSupport/LanguageSupport.module - Languages Support"

  • Like 1

Share this post


Link to post
Share on other sites

I am getting warning as below after login as admin

1.thumb.png.5da501dccff8086e62a8791e979414b1.png

Please suggest can I include ‘en_US.UTF-8’ against English -> /wire/modules/LanguageSupport/LanguageSupport.module as in below screen shot. But against ‘Chinese’ the same corresponding file does not exists.

2.png.fa8a069e3b97d9bc6c5dd93f1f9ea70f.png

Thanks

  • Like 1

Share this post


Link to post
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

  • Recently Browsing   0 members

    No registered users viewing this page.