Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Ubuntu locale
PostPosted: Sun Jan 25, 2009 6:20 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
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


Top
   
 Post subject:
PostPosted: Sun Jan 25, 2009 7:06 am 
Offline
Senior Member
User avatar

Joined: Sat Oct 16, 2004 11:13 am
Posts: 176
For your users, you can generally add stuff in /etc/environment. If it doesn't work, try (in .bash_profile):
Code:
LC_ALL="your_loccale"; export LC_ALL

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


Top
   
 Post subject:
PostPosted: Sun Jan 25, 2009 7:53 am 
Offline
Senior Member

Joined: Wed Jan 21, 2009 7:13 pm
Posts: 126
Location: Portugal
Hi,

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


Top
   
 Post subject: Ubuntu locale setting
PostPosted: Sun Jan 25, 2009 9:40 pm 
Offline
Newbie

Joined: Fri Jan 23, 2009 12:30 am
Posts: 2
The Ubuntu way for setting a system-wide locale is to edit /etc/default/locale

In my case, this file contains :
Code:
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...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group