Upon logging in to a freshly launched Ubuntu 16.04 LTS instance from the Amazon Web Services, I encountered the following:

Like what every good Geekysaur would do, the first thing I did was to install the corresponding language pack I need. You could do that by typing in sudo apt-get install language-pack-<language>. Replace <language> with your corresponding language code. So for example, if you wanted to install the English language pack, run sudo apt-get install language-pack-en.

Around the end of the output, you would see something like the following:

Take note of the country code of the language you are trying to update to. For example, if you want to install English – Australia, the code is en_AU.UTF-8.

Now, with this code, modify your environment variables. You can do this by typing in sudo vim /etc/environment. Make sure NOT to remove ANY existing text here (e.g. PATH variables) and just add the following at the end:

Of course, make sure to replace the above with the corresponding country level language code you need. Afterwards, all you have to do is run sudo locale-gen "en_AU.UTF-8", again replacing the language code if needed, and you’re done!

Easy right! Did this help you? Do you have an easier way of fixing the locale and language issue mentioned above? We’d love to hear from you so hit us up in the comments or send us a message in our Facebook page!