Re: PHP extension 'gettext' doesn't work?

Mike Dalessio

I'm actually open to adding commonly-used locales to the rootfs; though
that wouldn't help anyone until they're able to upgrade.

I'd like to propose that we install the debian package `locales`, which
looks like it includes support for 311 locales and 232 charmaps. It's only
about 10MB installed (according to

Objections? Tracker story is here:

On Fri, Oct 23, 2015 at 8:44 PM, Daniel Mikusa <dmikusa(a)> wrote:

OK, so really sorry this took me so long to investigate, but I think I've
found the issue. Ubuntu has these "language packs" and in order for
gettext to work the system has to have that language pack installed.

You can see what language packs are installed on your system by running
`locale -a`. I was testing this on an Ubuntu docker image and the only way
I could make it work was to install the language pack. As soon as I did
that and restarted Apache HTTPD, I started to get my translations.

Running `locale -a` on the `cflinuxfs2` docker image shows that only these
language packs are installed.

$ locale -a

When I setup a test app and run it on CF, I get the same results. Only
`en_US.utf8` works.

Unfortunately, I'm not sure how you could go about installing more
language packs into the stack for CF. It seems that you have to install
them via `apt-get` and that simply won't work, since there's no root access
in the container. If anyone has any ideas about how to install more
language packs, let me know.

My only suggestion would be to use the intl extension instead of gettext.
I believe it offers similar functionality, although it's not something I've
done myself.

Hope that helps!


On Fri, Oct 9, 2015 at 4:47 AM, Hiroaki Ukaji <dt3snow.w(a)> wrote:

Thanks for your confirmation.
I'm glad that it seems like my intention is being conveyed.
(I'm sorry about my poor English...)

I'm looking forward to hearing a second look from you.


Hiroaki UKAJI

View this message in context:
Sent from the CF Dev mailing list archive at

Join { to automatically receive all group messages.