Jan Herman
Forum Replies Created
-
Forum: Plugins
In reply to: [Loco Translate] Is there a hook to add custom strings to .pot file?Looks great 🙂
Thank you very much 😉Forum: Plugins
In reply to: [Loco Translate] Is there a hook to add custom strings to .pot file?Hi.
Thanks for considering this.
I would be fine with using the
Translation_Entryclass. But I’m probably not the right person to ask as this is my first time working with translation strings 🙂Forum: Plugins
In reply to: [Loco Translate] Is there a hook to add custom strings to .pot file?Hi.
Thanks for the info. I’ll look into the
loco_file_writtenhook. It’s not ideal but it should do the trick.I already considered the option you suggested (creating dummy php file with all the strings), but I don’t think it’s very elegant. I don’t want a temp directory inside my theme and creating it somewhere else introduces more problems. Also the script would probably have to be ran only on demand via CLI – meaning some people will for sure forget to do it.
Anyway if you’ll consider adding the hook I dont’t think you should expose the internal structures. Just a simple array would be fine. But I understand that it would require some modifications and probably also itroduce other headaches in form of validating the said array etc.