i want to translate the digits into non-english script. the translation files (.po files) dont have translation of digits. how can i change the digits language?
i found this workout on net and used this code in functions.php to change roman digits into bengali language.
function make_bangla_number($str)
{
$engNumber = array(1,2,3,4,5,6,7,8,9,0);
$bangNumber = array(১,২,৩,৪,৫,৬,৭,৮,৯,০);
$converted = str_replace($engNumber, $bangNumber, $str);
return $converted;
}
add_filter( 'get_the_time', 'make_bangla_number' );
add_filter( 'the_date', 'make_bangla_number' );
add_filter( 'comments_number', 'make_bangla_number' );
add_filter( 'get_comment_date', 'make_bangla_number' );
add_filter( 'get_comment_time', 'make_bangla_number' );
i took a guess and tried
add_filter( 'the_ratings', 'make_bangla_number' );
and it doesn't work :(
P.S.- i want to do the same with 'wp-pagenavi' plugin. i tried the same with that too-
add_filter( 'wp_pagenavi', 'make_bangla_number' );
it changed the displayed digits to ১,২,৩,৪,৫... but when clicked it doesn't go to- http://www.example.com/page/2. instead it goes to- http://www.example.com/page/%E0%A7%A8