Eastern Arabic numerals in Wordpress

Any ideas on how to set up Wordpress to get date and page numbers in Eastern Arabic numerals?

It's 0660 to 0669 in UTF-8. I am talking about making these numbers 0123456789 replace 0123456789 . I am using Wordpress 2.7.

+1


a source to share


3 answers


السلام عليكم

This is not possible with any of the default Wordpress tools. The Link to Style Pages link provides only limited customization of page numbers.

So you have a couple of options.

  • Change wp_link_pages () in wp-includes / post-template.php
    But this is pretty hacky and will cause problems when it's time to update.
  • Write a small plugin that bypasses wp_link_pages () entirely, possibly by editing existing (WP page numbers) plugins.
    This is useful for maintenance and portability (you can redistribute the plugin).


In both cases, you will need to do some matching: {{0,0}, {1,1}, {2, 2} ....} and perform a string replacement after calculating the page number.

Also, I looked at WP Arabic translation , but it uses traditional numbers, which seems silly.

حظ سعيد يابشا

0


a source


I would suggest that you are not doing the replacement ...



Storing normal numbers from 0x40 to 0x49 allows search engines to search by numbers. An Arab who prefers a different numbering system would install this on their operating system and they would see 0123456789 as 0123456789.

+2


a source


If anyone else is looking you can use

<?php echo date_i18n(get_option('date_format')); ?>

      

http://codex.wordpress.org/Function_Reference/date_i18n

+2


a source







All Articles