I'm trying to add i18n support for my open-source PHP project. I've been trying to use gettext, but I am running into some issues which I could see being a problem down the road.

For example, the way that caching requires one to restart the web server is frustrating during development. The workarounds I've seen are hacky, and several people have suggested that gettext doesn't make sense for the web and should be deprecated. I would agree, and add that the .po format itself seems outdated, especially in the modern world of JSON and XML.

I also don't like that the main tool (poEdit) for generating and editing the .po translation files is freemium, rather than completely free.

That being said, is there a real alternative? I saw php-gettext, but I can't tell if it is still actively maintained. Ideally, I'd like something that is:

  • Widely used (maybe it's just hiding from me?)
  • Actively maintained
  • Works out of the box (doesn't require special web server configuration)
  • Available on Packagist

This question suggests that gettext is the right way to go, but at this point the question is over 2 years old. As we know, a lot can change in software over two years.

  • 1
    Nope, it should be asked on programmers.stackexchange.com If you are at a PC, ask s.o, if you are at a whiteboard, ask programmers. S.O expects you post some code and explain how it doesn't work. Programmers handles questions like this – Mawg says reinstate Monica Mar 1 '15 at 19:10
  • Hmm, I'm not sure if either of those places are appropriate when looking for an explicit recommendation. – alexw Apr 13 '16 at 18:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.