We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18206
    • 59 Posts
    Using ditto with the parameter &language=’svenska-utf8’, I encountered two problems. First of all, the name of weekdays were returned in english. No biggie, I added a setlocale()-call to my svenska-utf8.inc.php file and it translated all the weekdays.

    But then another problem surfaced: swedish letters ’å’ and ’ö’ were replaced with questionmarks, like m�ndag instead of "måndag" for monday.
    Changing row 294 from..
    $placeholders[’date’] = strftime($dateFormat,$timestamp);
    to..
    $placeholders[’date’] = utf8_encode(strftime($dateFormat,$timestamp));
    solved this for me but it seems like a hack. If I were to use ISO-8859-1 again I’d have to undo this change. Is there a better way to solve this? I’m using UTF-8 on my whole site and everything but the weekdays’ names is presented like expected.

    I’m using Evo 1.0.0
      • 22851
      • 805 Posts
      PaulSuckling Reply #2, 17 years ago
      How about something like:
      $placeholders['date'] = iconv( strftime($dateFormat,$timestamp), $modx->config['modx_charset'], 'ISO-8859-1' );
      
        YAMS: Yet Another Multilingual Solution for MODx
        YAMS Forums | Latest: YAMS 1.1.9 | YAMS Documentation
        Please consider donating if you appreciate the time and effort spent developing and supporting YAMS.