Hello, We are a school in Madrid (Spain) I am inatalling Gibbon for the first time to evaluate the software and hopefully use it for our school.
The problem that I have is that no matter what language I select from system Admin/Language Settings, the software stays in English.
I have checked the locale in our server and it seems to be OK.
I have also checked the database and I can see that the default language is spanish.
Reading thru this forum, I have seen that there might be an issue with nginx. Our VPS runs with nginx, so, that might be the problem but I cannot find any discussion regarding fixing the language problem with nginx.
Sadly I’ve no experience with NGINX, but I know that @UrkoM does, and he might be able to contribute.
@fvlasie it definitely can be achieved in Apache, and in brief requires that a) relevant locales are set up (this script is useful here) and b) the gettext extension in PHP is enabled. Let me know if you need further help.
I’m not familiar with nginx, but I wonder if the issue on your server is specific to Gibbon, or to any software using the same approach to translation (i.e. gettext). An example of such software would be WordPress: https://codex.wordpress.org/I18n_for_WordPress_Developers.
If you could test WordPress on your server it would shed some light as to the scope of the issue.
I'm not familiar with nginx, but I wonder if the issue on your server is specific to Gibbon, or to any software using the same approach to translation (i.e. gettext). An example of such software would be WordPress: https://codex.wordpress.org/I18n_for_WordPress_Developers.
If you could test WordPress on your server it would shed some light as to the scope of the issue.
Thanks,
Ross
Hello Ross,
I have several sites on the same server. Some are Wordpress, some are Joomla and a couple of prestashops and neither of them have this problem, I am able to switch languages on all of them. Gibbon in the only app that I cant get the language setup right.
I wonder if it’s related to a variation in locale codes and env values between different systems. It looks like the setlocale() function in PHP can be expanded to account for multiple possible formats. Perhaps look for the following lines 65-66 in src/Gibbon/Locale.php`
`putenv('LC_ALL='.$this->i18ncode);
setlocale(LC_ALL, $this->i18ncode);`
```
and replace those two lines with these ones, which includes more variations: