eventsmanager

Translate Text using gettext filter/hook

Apr 12th, 2015 (edited)
1,187
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * Translate Text using gettext filter/hook
  3.  * As for where to paste this : http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  4.  */
  5. function change_label( $translated_text, $text, $domain ) {
  6.         switch ( $translated_text ) {
  7.             case 'Recent Bookings' :
  8.                 $translated_text = 'Gutscheincode';
  9.                 break;
  10.         }
  11.     return $translated_text;
  12. }
  13. add_filter( 'gettext', 'change_label', 100, 3 );
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×