Localize date format using i18n
Tested on:
Drupal 16+ Date API x-4 Internationalization x-3
Any date format is stored as system variable (on the global $conf variable).
Since Internationalization module allows to declare some system variables as Multilingual, you could add to your $conf\[‘i18n_variables’\] on settings.php these lines to use different date format for different languages:
$conf['i18n_variables'] = array( // Other variables // bla bla bla // Date variables 'date_format_long', 'date_format_medium', 'date_format_short', 'date_first_day', );
date_format variables are Long, Medium and Short date format, used in many places (including Views).
date_first_day is the first day displayed on calendars (e.g. Sunday for English, Monday for Italian).
Note that you have to save the value twice via:
http://example.com/en/admin/settings/date-time (http://example.com)
And one more time:
After the first time, you can change format as you like without double checking.
See also:
*
https://web.archive.org/web/20100708000000*/http://example.com/it/admin/settings/date-time (https://web.archive.org)
/> <a href= (https://web.archive.org)
https://web.archive.org/web/20100708000000*/http://example.com/en/admin/settings/date-time (https://web.archive.org)
<p>And one more time:</p> <p><a href= (https://web.archive.org)
https://web.archive.org/web/20100708000000*/http://example.com/it/admin/settings/date-time (https://web.archive.org)
<p>After the first time, you can change format as you like without double checking.</p> <p>See also:</p> <ul> <li><a href= (https://web.archive.org)
https://web.archive.org/web/20100708000000*/http://drupal.org/node/134002 (https://web.archive.org)
Response: 20 (Success), text/gemini
| Original URL | gemini://chirale.org/2010-07-08_396.gmi |
|---|---|
| Status Code | 20 (Success) |
| Content-Type | text/gemini; charset=utf-8 |