Jump to content
benbyf

how to set multi-lang server setting

Recommended Posts

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

 

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

I get an internal server error complaining that the function doesnt exist if i do that 😕

Share this post


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

  • Like 1

Share this post


Link to post
Share on other sites

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.

Share this post


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

 

  • Like 1

Share this post


Link to post
Share on other sites

 

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

 

  • Like 3

Share this post


Link to post
Share on other sites

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

  • Like 4

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...