Last active
August 29, 2015 14:06
-
-
Save nash-ye/3172dd2d079832d51622 to your computer and use it in GitHub Desktop.
Revert Back the Arabic "Widgets" Translation.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'gettext', 'change_widget_translation', 10, 3 ); | |
/* | |
* Change the Arabic "Widgets" translation. | |
* | |
* @return string | |
*/ | |
function change_widget_translation( $translations, $text, $domain ) { | |
if ( 'default' === $domain && 'ar' === get_locale() ) { | |
$search = array( | |
'الودجات', | |
'ودجات', | |
'ودجت' | |
); | |
$replace = array( | |
'المربعات الجانبية', | |
'مربعات جانبية', | |
'مربع جانبي' | |
); | |
$translations = str_replace( $search, $replace, $translations ); | |
} | |
return $translations; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment