• Hello,
    my girl friend has a blog now and so I became the technical administration stuff ;-). I’m a software developer, but I’m not familiar with php nor with wordpress.

    She needs to get a text changed that’s in one of the gettext translations (wordpress/wp-content/languages/de_DE.*). I’ve changed the text, compiled the po-file to a mo-file and the change was visible on the page. Voila ??

    Now, a few hours later, the old text reappeared and after I’ve redid the change on the server, the required text was in place again. A few hours laters, the change vanished a second time.

    I guess this might be a side effect from the automatic update function, right?

    If so, what options do I have to have my text changes surviving a software update? What comes to my mind would be:

    * Using an own translation (de_AF for example)
    * Finding some kind of “pre-installation” hook, where I could apply a patch to the translation and compile the translation.
    * Finding a way to have some kind of plugin into the wordpress gettext system to return the required text.

    Any suggestions, comments, tipps?

    Thanks in advance and kind regards,
    Torsten

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you can’t find a permanent solution…

    I have a plugin, Real-Time Find and Replace, that allows you to change text on the final assembled HTML page before it is sent to a user’s browser. You tell the plugin what to look for and what to replace it with. The change is made on-the-fly with no updates to the actual content in the database. And the find/replace rules you specify survive theme updates.

    Thread Starter Torsten Robitzki

    (@torsten-robitzki)

    Hi Marios,
    that sounds like a good solution to me. I guess the rules are stored somewhere in the database? (some kind of regexpr?) Is the plugin public available?

    cheers,
    Torsten

    Yes the plugin is in the WordPress plugin repository. Because it’s my plugin I’m trying not to seem to self-serving by posting a link. Search for the name I gave previously and you’ll find it.

    The free version will do what you need it to do so no need, in your case, to consider the pro version. The rules are stored in the options table. You can use “simple” rules which work for many cases and also regex rules if you have a tricky situation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Changing static text’ is closed to new replies.