How to change the day and month language? Working on multilingual site, I want to change the language of the month in dutch language. For that I have created a module.

&lt;?php
function mymodule_format_date($timestamp, $type = 'custom', $format = 'd M', $timezone = NULL) {
  return format_date($timestamp, $type, $format, $timezone, 'nl');
}


and on the node file put the date format in t() function

&lt;?php print t(format_date($created, 'custom', 'd M')); ?&gt;


but no luck. Please help.
For multilingual you need to import .po file in your setup. Download .po file from this link just add language prefix at here language_prefix (/en, /hi, /de etc..).

https://localize.drupal.org/translate/languages/language_prefix

Now, add &lt;?php print date('j F Y', $created) ?&gt; simple php data function and add your data formate here.

After you will able to see day and month in your language.

If you wish to make a different format for both language just add this.


&lt;?php if($language-&gt;language == "language_prefix") {
  print date('j F Y', $created); 
} 
else {
  print date('F j Y', $created);
}

Thank you.