Categories
Linux

Adding locales in Ubuntu Server

I am always googling this. Everytime I need a new locale in a Ubuntu Server to get gettext working I do:

locale -a #lists locales
sudo locale-gen ru_RU
sudo locale-gen ru_RU.UTF-8
sudo update-locale
# then I need to restart apache to refresh the gettext cache
sudo service apache2 restart
# or
service php7.0-fpm-sp restart