Search code examples
phpwordpresslocalizationgettexthardcode

Wordpress po/mo classes


I am trying to make a simple system with plugin and themes support, but I need translation for them. The file path of languages with /en/LC_MESSAGES is too big and I want simple and it should be put only in languages folder of the plugin, just like Wordpress. I see that Wordpress seems to use a hardcoded version of gettext stored in the folder pomo. Is it taken from another project? Will it be easy to extract this classes and adapt to my project? Do you know any other project that I can reach the same result?

PS: I don't want to recreate Wordpress, it is a very simple Framework and not a CMS system. It is mandatory to have localization, so I have to find a way to do this and make the simplest as possible to the users.

Any help appreciated.

Thanks in advance and sorry for my bad English, Vinicius.


Solution

  • Found this class written by Danilo Segan that does exactly what I need, standalone gettext parser