Ubuntu locale

Hi,

I've followed this guide to get locale to Portuguese.

When I run locale as root, I see all definitions in Portuguese, but if I run as a regular user, locale is set to POSIX

I need to set this so that dates in php are shown in Portuguese.

What else do I need to do?

Thanks

N

3 Replies

For your users, you can generally add stuff in /etc/environment. If it doesn't work, try (in .bash_profile):

LC_ALL="your_loccale"; export LC_ALL

And , in your PHP script: setlocale (LC_ALL, "your_locale");

Hi,

Thanks for your tip, but it doesn't work.

The Ubuntu way for setting a system-wide locale is to edit /etc/default/locale

In my case, this file contains :

LC_ALL="en_US.UTF-8"
LANG="en_US.UTF-8"

You need to make sure the corresponding language-pack-xx is installed (in my case, language-pack-en).

Hope it helps…

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct