Freebsd setlocale

Under FreeBSD, locale definitions are stored in the /usr/share/locale/ directory.

1
2
setlocale(LC_TIME,'zh_CN.UTF-8');
echo strftime('%A %d %B %Y', mktime()) . "<br />";

Switch back to default

1
setlocale(LC_ALL,NULL);

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>