Menu

Ru, ar date format with V1.061

i18n
2005-09-28
2013-03-27
  • Nobody/Anonymous

    Hi!
    I am trying to get this to work with ru and ar translation:

    <?php echo "<select name='month' size='1'>";
    echo "<option value=''></option>";
    for ($i=1;$i<13;$i++) {
    echo "<option value='" . $i . "'>" . $format_date->monthName(mktime(0,0,0,$i,1,1)) . "</option>\n";
    }
    echo "</select><br>";  ?>

    I tried in i18n_settings.ini:
    [FormatDate]
    encode_strings = TRUE

    No success. Could someone help me please?
    Thx.

     
    • Nobody/Anonymous

      Found it!

      In class.FormatDate.inc.php function monthName and dayName, this needs to be changed:

      return (string) $this->lg->_($this->day_array[$day]);

      to:

      return (string) $this->lg->__($this->day_array[$day]);

       
    • Drazen

      Drazen - 2005-09-29

      Now with all others languages except ru and ar it is doing:

      Sep-tem-bre
      Oc-to-bre
      etc.

      in the list. Please help!

       
    • flaimo

      flaimo - 2005-09-29

      because those - are &shy; characters. since you enabled encoding with the switch from the _ function to the __ function, you have to delete those characters from the translation files. use a text editor which can handle utf-8 encoding

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.