benbyf Posted January 15, 2019 Share Posted January 15, 2019 get this warning and am unsure even with the nice warning what to do here, the links dont seem to help - want to set eh site to FR and not the whole server as it is a shared server: https://www.dropbox.com/s/dxtfcrt1eyg9t7o/Screenshot 2019-01-15 11.40.53.png?dl=0 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 • Française For example, the locale setting for US English might be: en_US.UTF-8 Link to comment Share on other sites More sharing options...
szabesz Posted January 15, 2019 Share Posted January 15, 2019 Hi @benbyf See this comment: https://processwire.com/talk/topic/15691-warning-about-server-locale-after-update-from-3052-3053-help/?do=findComment&comment=143552 and the related docs: https://processwire.com/api/ref/languages/set-locale/ Does this help? Link to comment Share on other sites More sharing options...
benbyf Posted January 15, 2019 Author Share Posted January 15, 2019 Thanks, those seem like they would help but still getting the warning. I've set the two lang's to fr_FR.UTF-8 and en_EN.UTF-8 respectively in the admin, and added setlocale(LC_ALL, "fr_FR.UTF-8"); to the config, but doesnt seem to make a difference...? Link to comment Share on other sites More sharing options...
Gideon So Posted January 15, 2019 Share Posted January 15, 2019 Hi @benbyf, Put setlocale(LC_ALL, "fr_FR.UTF-8"); into ready.php. Gideon Link to comment Share on other sites More sharing options...
benbyf Posted January 15, 2019 Author Share Posted January 15, 2019 I get an internal server error complaining that the function doesnt exist if i do that ? Link to comment Share on other sites More sharing options...
cstevensjr Posted January 15, 2019 Share Posted January 15, 2019 1 hour ago, Gideon So said: Hi @benbyf, Put setlocale(LC_ALL, "fr_FR.UTF-8"); into ready.php. Gideon I believe you need to put this in your /site/config.php file 1 Link to comment Share on other sites More sharing options...
BitPoet Posted January 15, 2019 Share Posted January 15, 2019 @benbyf, have you looked at the first link @szabesz posted? Link to comment Share on other sites More sharing options...
benbyf Posted January 15, 2019 Author Share Posted January 15, 2019 Yep, and I have fr_FR.UTF-8 in the C field for french and en_EN.UTF-8 for the english and setlocale ( LC_ALL, "fr_FR.UTF-8"); set in my config but the warning persists. Link to comment Share on other sites More sharing options...
matjazp Posted January 15, 2019 Share Posted January 15, 2019 But are those locales available on your server? Link to comment Share on other sites More sharing options...
benbyf Posted January 15, 2019 Author Share Posted January 15, 2019 ??? no idea, in what way? Link to comment Share on other sites More sharing options...
Sergio Posted January 15, 2019 Share Posted January 15, 2019 2 hours ago, benbyf said: ??? no idea, in what way? AFAIK, only English is installed by default (at least on Digital Ocean servers) so I always went up "sshing" and installing my Portuguese ones ? Check in your shared server panel docs if they have more locales installed. 1 Link to comment Share on other sites More sharing options...
elabx Posted January 15, 2019 Share Posted January 15, 2019 2 hours ago, benbyf said: ??? no idea, in what way? If you have command line access, try: locale -a This lets you know the available locales in the server. There might also be a PHP way I guess. If the ones you need are missing, you are going to have to install them. Not an expert on this field but I've done it on a few servers and it's not very complicated googling a little bit (also asumming you're not on shared hosting and have shell access to the server to make this installation). 3 Link to comment Share on other sites More sharing options...
benbyf Posted January 21, 2019 Author Share Posted January 21, 2019 YESSSS thank you, this did the trick. I ssh'ed into my server and added the fr_FR langs and now the warning has gone... ? 4 Link to comment Share on other sites More sharing options...
nbcommunication Posted October 16, 2019 Share Posted October 16, 2019 I was also getting the same warning for a dual English/French install I'm working on. First time using multi-language. I had setlocale(LC_ALL, "en_GB.utf8"); in site/config.php, and had set the values in LanguageSupport "C" fields as the error requests (en_GB.utf8 & fr_FR.utf8). Still getting the error message on login. SSH checked the locales using locale -a, and they were listed. Hmm... Tried a few things, but what worked for me was putting setlocale(LC_ALL, "en_GB.utf8", "fr_FR.utf8"); in site_ready.php. Error message now gone - hurrah! 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