Get answers quicker by searching

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

Translation not being picked up on Ubuntu
  • Vote Up0Vote Down angelimangelim
    Posts: 7Sendy user

    Hi, 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?

  • Vote Up0Vote Down BenBen
    Posts: 3,606Sendy support

    Hi angelim,

    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 →

    This was written in Step 4 of Sendy's translation guide but I guess you've missed it.



  • Vote Up0Vote Down angelimangelim
    Posts: 7Sendy user

    Hi Ben, 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 Generating locales... en_US.UTF-8... up-to-date pt_BR.UTF-8... up-to-date

    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 en_US.UTF-8 UTF-8 pt_BR.UTF-8 UTF-8

    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.

    Best regards


  • Vote Up0Vote Down BenBen
    Posts: 3,606Sendy support

    Hi Alexandre,

    Thanks for sharing.


This discussion has been closed.
All Discussions