Dans le plugin WordPress, la date sera affichée dans la langue de votre installation WordPress. Cependant, il peut arriver que vous ayez plusieurs flux sur un site et que chacun d'entre eux doive être dans une langue différente, ou que vous utilisiez la version PHP Standalone, et que vous deviez donc traduire les mois de la date manuellement. Vous pouvez le faire en utilisant l'extrait JavaScript personnalisé ci-dessous :
$('.cff-start-date, .cff-end-date').each(function(){
var mapObj = {
Jan:"Translated Jan",
Feb:"Translated Feb",
Mar:"Translated Mar",
Apr:"Translated Apr",
May:"Translated May",
Jun:"Translated Jun",
Jul:"Translated Jul",
Aug:"Translated Aug",
Sep:"Translated Sep",
Oct:"Translated Oct",
Nov:"Translated Nov",
Dec:"Translated Dec"
};
newText = $(this).text().replace(/Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec/gi, function(matched){
return mapObj[matched];
});
$(this).text(newText);
});
Si vous affichez les noms de mois complets, vous devrez changer les "Jan", "Feb", "Mar", etc, pour les noms de mois complets ; "January", "February", etc.
Note: In the WordPress plugin you’d need to add the JavaScript to your site using a custom JavaScript plugin. For further information see our documentation here. In the PHP Standalone version you’d need to add it to your website’s JavaScript file, or to the bottom of your page within <script> tags.
