Dear Minesh
This I do have like this, but on this link: lien caché
On the first column, the 4th line, it's still Mrz. This is because I do have there the Toolset short code for this filed I use.
It's the "start date of any tour. So any other custom short code I can't use there, or I just do a new custom code.
Do You understand what I am talking about? In this first column, I do use the Toolset short code, and this gives me an Mrz - and not a Mär.
Regards,
Minesh
Supporter
Les langues:
Anglais (English )
Fuseau horaire:
Asia/Kolkata (GMT+05:30)
I've replaced the existing shortcode:
[types field='tour-date-field' style='text' format='d. M Y'][/types]
With:
[tourenddate tourdate='[types field='tour-date-field' style='text' format='Y-m-d'][/types]' type="date"]
I can see now it shows month name as: Mär
=> lien caché
Dear Minesh
But this short code don't gives the start date out!
I might need to add another custom function with a short code short code.
I added now another function, where it shows me now the start date:
function custom_tourstart_date( $atts ) {
$adate = '';
$atype = '';
// Attributes
$atts = shortcode_atts(
array(
'tourdate' => 'today',
'type' => '',
),
$atts
);
$adate = $atts['tourdate'];
$atype = $atts['type'];
if ((ICL_LANGUAGE_CODE=='en') && ($atype=='day')) {
$startdate = date('l', strtotime($adate));
}
else if ((ICL_LANGUAGE_CODE=='en') && ($atype=='date')) {
$startdate = date('d. M Y', strtotime($adate));
}
else if ((ICL_LANGUAGE_CODE=='de') && ($atype=='day')) {
setlocale(LC_ALL, 'de_DE.UTF-8');
$startdate = strftime('%A', strtotime($adate));
}
else if ((ICL_LANGUAGE_CODE=='de') && ($atype=='date')) {
setlocale(LC_TIME, 'de_DE.UTF-8');
$startdate = strftime('%e. %b %Y', strtotime($adate));
$startdate = str_replace("Mrz","Mär",$startdate);
}
return $startdate;
}
add_shortcode( 'tourstartdate', 'custom_tourstart_date' );
Regards,
My issue is resolved now. Thank you!