Drupal 7 date string block not translated to Arabic
I have a custom block for Arabic content using PHP input format, and tested with some below to no avail at my windows:
setlocale(LC_ALL,'ar');
echo iconv('ISO-8859-1', 'UTF-8', strftime('%B', time())); // output July
setlocale(LC_ALL,'ar');
echo date(t('F')); // output July, I can not find the string at admin/config/regional/translate/translate
s开发者_JAVA百科etlocale(LC_ALL,'ar');
echo utf8_encode(strftime('%B')); // output July
I expected something like يوليو or equivalent at Arabic.
Does anybody have any hint with Arabic date?
I ended up using http://api.drupal.org/api/drupal/includes--common.inc/function/format_date/7, and this resolved my problem. No need to screw up with set_locale. I don't have to translate the string, either. I love Drupal.
精彩评论