It looks like you're new here. If you want to get involved, click one of these buttons!
I've managed to get translations working on my development machine by following the recommended steps, but I can't get them to work in production. I've already checked file permissions, cleaned apc cache, reloaded php-fpm and nginx. I've also checked the production database and my login is already set up for the second language. gettext is working fine at this server, which can be confirmed by a wp install with localization. Any ideas?
I see you're using Ubuntu. For gettext to pick up your language on Ubuntu, you need to add proper locales to your system first → http://pof.eslack.org/2010/11/17/php-gettext-problems-on-ubuntu-server/
This was written in Step 4 of Sendy's translation guide but I guess you've missed it.
Thanks for the quick response. While it didn't solve the issue right away, it led me in the right direction.
The language I was trying to set up was pt_BR, which was already being used on a Wordpress installation in this server(to my knowledge it also uses gettext for translation).
# dpkg-reconfigure locales
The only difference on the localization support files is that I don't have a file for each language. I have only one file listing all of them.
# cat /var/lib/locales/supported.d/local
I was generating my .mo files for the default character set(using the directory /pt_BR/) and locales had only the pt_BR.UTF-8 version. When I changed the line to "pt_BR UTF-8" and regenerated locales, all worked well.
Because you're forcing encoding to UTF-8 T_bind_textdomain_codeset('default', 'UTF-8');, I think I'll be fine.
Thanks for sharing.