Jump to content

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


EyeDentify
 Share

Recommended Posts

  • 2 weeks later...

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.

Link to comment
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
Link to comment
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
Link to comment
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?

Link to comment
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().

Expand  

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

Link to comment
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
Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 4 months later...
  On 6/14/2017 at 11:36 AM, 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

Expand  

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 3
Link to comment
Share on other sites

  • 2 weeks later...
  • 6 months later...

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