Hi Brigitte,
Thanks for updating us on your progress!
I have tried to recreate the issue you experienced, but locally I was able to change my default culture without any issues. I'm glad to hear you've got things working as you need to - but just in case it helps others, I will share some general thoughts below.
First, to make sure that any settings changes stick it can be a good idea to make sure that the permissions are properly set in your installation. Everything should be owned by the www-data user - you can try resetting the permissions by running the following command from AtoM's root installation directory (which is typically /usr/share/nginx/atom if you have followed our recommended installation instructions):
- sudo chown -R www-data:www-data /usr/share/nginx/atom
The configuration file where the default culture is set is found within AtoM at: apps/qubit/config/settings.yml
A couple things about editing this file:
First, if you change the language code, make sure you maintain the existing spacing between the default_culture label and the value. Make sure you are using a valid ISO 639-1 language code - a list of supported languages in AtoM and their codes can be found here:
Make sure you save your changes properly in the config file - how you do this will depend on what text editor you use in your console. I personally always use nano, because I find its commands simpler than something like vim, which is often the default editor. If you want to use nano as well, you can access the file to edit it with:
- sudo nano apps/qubit/config/settings.yml
If you don't have nano installed, you can install it with:
- sudo apt-get update
- sudo apt-get install nano
With nano, once you've made your changes, use CTRL+O to write the changes, press enter to preserve the file's current name, and then CTRL+X to exit.
Additionally, if you change any of the configuration files, you need to restart PHP-FPM for the changes to take effect. From your post in the forum, I'm wondering if this might be the step you missed previously? In Ubuntu 18.04 with PHP 7.2, you can run the following:
- sudo systemctl restart php7.2-fpm
With Ubuntu 16.04 and PHP 7.0, use:
- sudo systemctl restart php7.0-fpm
At this stage, I also recommend clearing the application cache. If you are using an additional caching engine such as memcached, restart that as well (you can try the command, it won't do any harm if you don't have memcached installed, it will just tell you):
- php symfony cc
- sudo systemctl restart memcached
You will also need to re-index the site content now that you have a new default culture:
- php symfony search:populate
Before you test, don't forget that your browser also has its own cache. You should clear this as well - or at least test in an Incognito or Private browser window, where the browser cache is typically disabled by default.
One important thing to note when verifying if the change has taken effect: changing the default installation culture will NOT automatically translate your data. The changes you should see have to do with the text on the user interface elements - things like the browse menu labels, the facet headers on search pages, the button block labels on view pages, the labels in the Settings, etc. French has good coverage in AtoM provided by our volunteer translator community (you can see the list of translated languages and the status of the translations here, and learn more about how to contribute translations here), but remember that not all languages have full coverage. AtoM uses what is known as culture fallback - so in places where there is no translated string provided, the inteface will "fall back" to displaying the default English string (rather than displaying nothing).
Keep in mind as well that if you create a bunch of descriptions in the English interface, then change the culture of your site, even if you wrote the content in French, in the database those descriptions have a culture of en listed - because you created them while in the English UI! Consequently the source culture in the database of your descriptions will be listed as English, even if the actual content was written in a different culture. I think you would need to use SQL to change this directly in the database. If you had English as your installation culture, but actually wrote your descriptions in French while using the French interface, then everything should be fine.
Finally, at this time, English cannot be fully removed from the language menu in AtoM - because that is the source language of all the user interface elements and the underlying code. As Corinne noted in her original response, you can hide the entire language menu from view, via Admin > Settings > Default page elements. See:
I hope this helps you and other users!
Cheers,
Dan Gillean, MAS, MLIS