Skip to content

Instantly share code, notes, and snippets.

@KaineLabs
Created November 5, 2018 21:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KaineLabs/b4d2e13ec5b5671cf691c204ade4824d to your computer and use it in GitHub Desktop.
Save KaineLabs/b4d2e13ec5b5671cf691c204ade4824d to your computer and use it in GitHub Desktop.
Translate __x Words
<?php
/**
* Translate __x Words.
*/
function yzc_translate_x_words( $translated_text ) {
switch ( $translated_text ) {
case 'Friendships' :
$translated_text = 'Connections';
break;
}
return $translated_text;
}
add_filter( 'gettext_with_context', 'yzc_translate_x_words', 1 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment