Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

adding locale on server

Tags:

date

unix

locale

I am planning to use strftime(), however when I check my server regarding what's available locale, via (locale -a), I only have this:

C
en_US.utf8 
POSIX

I badly need to have this de_DE.utf8, in order to turn my dates to German. How can I add additional locale? Is there any other better way?

like image 663
planet x Avatar asked Feb 17 '12 08:02

planet x


People also ask

How do I reconfigure locale?

If you want to change or set system local, use the update-locale program. The LANG variable allows you to set the locale for the entire system. The following command sets LANG to en_IN. UTF-8 and removes definitions for LANGUAGE.

How do I fix my locale issue?

One solution to fix this issue, first run the locale command to list the locales currently defined for your user account. To generate the missing locale and reconfigure locales, identify the name of your locale ( in my case de_DE. UTF-8 ), or use one another one that you prefer, such as en_US. UTF-8 .


1 Answers

dpkg-reconfigure locales does nothing for me on a plain vanilla install of Ubuntu 12.04 LTS, but locale-gen works like a charm:

sudo locale-gen de_DE.utf8
like image 62
lambshaanxy Avatar answered Nov 10 '22 14:11

lambshaanxy