ridgedale Posted April 11, 2017 Share Posted April 11, 2017 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. 1 Link to comment Share on other sites More sharing options...
Lenz Posted April 22, 2017 Share Posted April 22, 2017 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 More sharing options...
abdus Posted April 22, 2017 Share Posted April 22, 2017 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 3 Link to comment Share on other sites More sharing options...
Lenz Posted April 22, 2017 Share Posted April 22, 2017 @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. 2 Link to comment Share on other sites More sharing options...
Pino Posted April 25, 2017 Share Posted April 25, 2017 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 More sharing options...
rick Posted April 25, 2017 Share Posted April 25, 2017 (edited) 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 April 25, 2017 by rick added link 1 Link to comment Share on other sites More sharing options...
Pino Posted April 25, 2017 Share Posted April 25, 2017 Hey @rickI have also tried this using the $languages->setLocale() method, whitout succes. Link to comment Share on other sites More sharing options...
rick Posted April 25, 2017 Share Posted April 25, 2017 @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 More sharing options...
LostKobrakai Posted April 25, 2017 Share Posted April 25, 2017 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. 3 Link to comment Share on other sites More sharing options...
Pino Posted April 26, 2017 Share Posted April 26, 2017 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 Link to comment Share on other sites More sharing options...
funtoosh Posted June 12, 2017 Share Posted June 12, 2017 (edited) 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 June 12, 2017 by funtoosh typo Link to comment Share on other sites More sharing options...
Pino Posted June 12, 2017 Share Posted June 12, 2017 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 Link to comment Share on other sites More sharing options...
funtoosh Posted June 14, 2017 Share Posted June 14, 2017 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 Link to comment Share on other sites More sharing options...
K4mil Posted November 3, 2017 Share Posted November 3, 2017 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 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" 3 Link to comment Share on other sites More sharing options...
KarlvonKarton Posted November 13, 2017 Share Posted November 13, 2017 Like @K4mil I had to put 'nl_NL' in C (nl_NL for Dutch) to get rid of the warning, because the field C was empty. 1 1 Link to comment Share on other sites More sharing options...
SIERRA Posted May 15, 2018 Share Posted May 15, 2018 I am getting warning as below after login as admin 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. Thanks 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