I created a plugin to translate text of wp-login.php page into Arabic, every thing translated well except Back to
which appear at the bottom of login form, I can't catch it to translate into Arabic
My site name called Foodonia, and I want to translate ← Back to Foodonia
to العودة إلى فودنيا
, I tried each one of below:
← Back to Foodonia
Back to
Back to Foodonia
← Back to Foodonia
← Back to
here is my code
function my_custom_login_label( $translated_text, $text, $domain ) {
if (in_array( $GLOBALS['pagenow'], array( 'wp-login.php', 'wp-register.php' ) )) {
if ($translated_text === 'Username') $translated_text = 'اسم المستخدم';
if ($translated_text === 'Password') $translated_text = 'كلمة المرور';
if ($translated_text === '← Back to Foodonia') $translated_text = '← العودة إلى فودنيا';
return $translated_text;
}
}
add_filter( 'gettext', 'my_custom_login_label', 20, 3 );
My site URL: http://foodonia.com (changing language between English and Arabic using site nav menu will effect the login language)