Best way to change the "open now" text

I have a multipress installation, so i can not simply edit the plugin files.
I have 2 Child themes but i am not sure if this helps

How do i translate the words “Closed” “Open” “Open Now”
I do not use Loco translate or other translation plugins that will corrupt and destroy the database (i am surprised you are recommending this plugins)

i also do not want to use the add_filter( ‘gettext’, search function since its also not a good solution

So what is a good way to replace the text, i understand no variable is defined so also this is not possible.

What solution would you suggest?

Thank you in advance

Please let me know if you mean Multisite WordPress installation or you meant MultilingualPress? To change these static strings, using Loco (or any other plugins for editing PO files) and a code snippet for “gettext” filter are the only options since these texts are set in the code, but wrapped with a translation function.

1 Like

yes both is correct :slight_smile:

i did not find any PO files, i would appreciate to point me into the PO direction, since this would be a perfect solution long term

thank you in advance

thank you, i wanted to go with gettext, but this is a very common word so it could generate other translations on the website

Please check if MultilingualPress has any tools for static string translation (like WPML does). PO files are stored in hivepress-opening-hours/languages folder, so you can use something like POEdit for this, or add a code snippet for gettext, but I recommend using Loco if it doesn’t conflict with your current WordPress setup, it’s pretty reliable.

1 Like

oh sorry my error, how could i miss this perfect solution

thank you!


did solve it perfect!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.