that’s kinda wierd, because all my ditto calls with dates in other pages are displayed correct.
The &language parameter only affects the strings that Ditto outputs for certain conditions. The display of day and month names comes from strftime(), and that will use the locale settings on the server and in PHP (see http://www.php.net/manual/en/function.setlocale.php).
I haven’t tried changing locales, but you may find the following thread useful: http://modxcms.com/forums/index.php/topic,3129.msg22139.html#msg22139.
KP
that is exactly what I was thinking, but how to solve it? Because reflect is filling in Year and such?
then it’s related to &tplContainer, &tplYear, &tplYearInner, &tplMonth, and &tplMonthInner
<h3>Archives</h3> <div class="reflect_archive_list"> <ul class="reflect_archive"> [+wrapper+] </ul> </div>
<li class="reflect_year"> <a href="[+url+]" title="[+year+]" class="reflect_year_link">[+year+]</a> [+wrapper+] </li>
<ul class="reflect_months"> [+wrapper+] </ul>
<li class="reflect_month"> <a href="[+url+]" title="[+month+] [+year+]" class="reflect_month_link">[+month+]</a> [+wrapper+] </li>
<ul class="reflect_items"> [+wrapper+] </ul>
<li class="reflect_item"> <a href="[~[+id+]~]" title="[+pagetitle+]" class="reflect_item_link">[+pagetitle+]</a> (<span class="reflect_date">[+date+]</span>) </li>
[!Reflect? &getDocuments=`1` ¶ms=`parents:3|dateSource:Datum|orderBy:Datum ASC|language:nederlands` &id=`agenda` &dateFormat=`%d` &yearSortDir=`ASC` &dateSource=`Datum` &tplContainer=`container_chunk` &tplYear=`year_chunk` &tplYearInner=`yearInner_chunk` &tplMonth=`month_chunk` &tplMonthInner=`monthInner_chunk` &tplItem=`item_chunk`!]
<?php if (isset($setlocale)) setlocale(LC_ALL, $setlocale);
&setlocale=`nld_nld`
<div id="reflect">[!Reflect? &getDocuments=`1` ¶ms=`parents:18|language:nederlands` &tplContainer=`tplContainer` &tplYear=`tplYear` &tplYearInner=`tplYearInner` &tplMonth=`tplMonth` &tplMonthInner=`tplMonthInner` &tplItem=`tplItem` &setlocale=`Czech_Czech Republic.65001`!]</div>
this one was for you and other people who need their own language in Reflect.thanks goldsky!
thanks! that fixed everything, but should reflect not copy the locale of modx or something?
I got it!
Reflect does NOT take any language in its time function.
What Keith (kp52) said was right, you should set the setlocale() first to get the right language for MONTH text.
Well,
this one was for you and other people who need their own language in Reflect.
I’ve added new parameter to Reflect snippet to have this working.
<?php if (isset($setlocale)) setlocale(LC_ALL, $setlocale);
Copy-paste this Reflect snippet to your current one (over write it).
Then add this parameter to your Reflect call:
&setlocale=`nld_nld`
This sample attached is using this call:
<div id="reflect">[!Reflect? &getDocuments=`1` ¶ms=`parents:18|language:nederlands` &tplContainer=`tplContainer` &tplYear=`tplYear` &tplYearInner=`tplYearInner` &tplMonth=`tplMonth` &tplMonthInner=`tplMonthInner` &tplItem=`tplItem` &setlocale=`Czech_Czech Republic.65001`!]</div>