We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 19889
    • 616 Posts
    Hello,
    just upgraded to ditto 2.1 and I’m still experiencing issues with format of German dates - what I get is this: 01. M�rz 2008 instead of 01. März 2008;

    the settings/config I’m using are as follows:
    	// set locale	
    	setlocale(LC_ALL, 'de_DE@euro', 'de_DE', 'de', 'ge');
    
    	// parameters
    	$id				= 'headlines';
    	$parents 		= 8;
    	$limit			= 2;
    	$paginate		= 0;
    	$dateFormat 	= '%d. %B %Y'; // '%d. %B %Y, %H:%M:%S'
    	$hideFolders	= 1;
    	$extenders		= array('summary', 'dateFilter');
    	$language 		= 'german';	
    
    	// templates
    	// item
    	$tpl			= '@CODE:
    		<li><span class="news-date">[+date+]</span><br /><a href="[~[+id+]~]" title="[+title+]">[+title+]</a></li>';
    


    Am I doing something wrong here? Is there a fix to the problem?

    Thank you in advance for your help.
      • 10449
      • 956 Posts
      Which charset / encoding do you use a) for the pages (HTML) + b) for the database? If it’s ISO-8859-1, try UTF-8 instead.
        • 19889
        • 616 Posts
        I’m using UTF-8 allover
          • 21800
          • 174 Posts
          maybe this page helps
          http://de2.php.net/manual/de/function.strftime.php

          example for german:
          return iconv(’ISO-8859-1’, ’UTF-8’, strftime("%d. %B. %Y | %H:%m", $timestamp));
            • 19889
            • 616 Posts
            where would I have to put that - I don’t really want to mess around with the ditto core
              • 21800
              • 174 Posts
              I fear it’s necessery, I had a similar problem with Kalender enhanced.

              das Kunstwerk ist wohl nicht primär für Deutsche u. ä. Sprachkomplzierte gemacht. Z. B. gibt es ständig Schwierigkeiten mit hiesigen Providern, die durchgängig ihre mySQL auf schwedisch eingestellt haben, was denn je nach Ausbau von Modx so einiges nach sich zieht, was ein US-Entwickler nicht immer im Auge hat. ..
                • 10449
                • 956 Posts
                Ja, mySQL mit schwedischer Einstellung ist ein beliebter Klassiker... man muss aber auch sagen, dass sich PHP generell immer noch sehr schwer tut mit UTF-8.
                Sind denn die Ditto Files selber in UTF-8 gespeichert?
                  • 19889
                  • 616 Posts
                  what do you mean by whether the ditto files are saved in UTF-8?

                  by the way, let’s keep this discussion in English - this way we have a chance that Mark will join it
                    • 10449
                    • 956 Posts
                    What I mean is: Are the Ditto files themselves saved as UTF-8 files? I just came across a language file the other day that was labelled as utf-8 but the editor showed it as ANSI, hence the Umlauts were all b0rked.
                      • 21800
                      • 174 Posts
                      I feel slightley increasingly there are more utf-8 files. I even managed to set up a working ajax search (in german, I think as an indicator for this topic), which only troubles with safari (in an sql swedish environment).
                      Modx is really wonderfull (no doubt), although this topic always causes additional work for non english projects.
                      Isn’t there a possibillity while installation to force mySQL to work in utf-8 in depth (i. e. to overwrite swedish collation)?