Answers.Body: <p>If you don't need to customized the output you can also use the Crafts datetime methods <a href="http://buildwithcraft.com/docs/templating/datetime#localeDate" rel="nofollow"><code>localeDate()</code></a> and <a href="http://buildwithcraft.com/docs/templating/datetime#localeDate" rel="nofollow"><code>localeTime()</code></a> to return a date / time in the current locale's preferred date format.</p>
  
  <pre><code>{# Returns '7/15/2014' if current locale is 'en' #}
  {# Returns '15.07.2014' if current locale is 'it' #}
  {{ now.localeDate() }
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T03:58:45.690Z
Answers.Text: How do you set the preferred format for the locale?
Answers.UserDisplayName: Marion Newlevant
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T08:53:10.610Z
Answers.Text: I don't think you can, @Marion. That's why your approach is better if you have a need to customize the output.
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-15T00:17:54.280Z
Answers.LastActivityDate: 2014-07-15T00:17:54.280Z
Answers.UserDisplayName: carlcs
Answers.Body: <p>Craft has extended Twig's <a href="http://twig.sensiolabs.org/doc/filters/date.html">date filter</a> so that it translates the output (no documentation for this, but the code is in <em>craft/app/etc/templating/twigextensions/CraftTwigExtension.php</em> around line 152). So <code>{{now|date('F j, Y')}}</code> will give <strong>July 13, 2014</strong> on the English site, and <strong>luglio 13, 2014</strong> on the Italian site. Which is half way there. In order to get the Italian date to use the Italian format (<em>j F Y</em>), we need a translation for the format string. Add this to <em>craft/translations/it.php</em>. (For more info see <a href="http://buildwithcraft.com/help/static-translations">Static Translations</a>):</p>
  
  <pre><code>'F j, Y' =&gt; 'j F Y',
  </code></pre>
  
  <p>To output the translated date:</p>
  
  <pre><code>{{now|date('F j, Y'|t)}}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-07-14T02:07:52.630Z
Answers.LastActivityDate: 2014-07-14T02:07:52.630Z
Answers.UserDisplayName: Marion Newlevant
Body: <p>I have a multilingual site, and I want my dates formatted like:</p>
  
  <ul>
  <li>English site: July 13, 2014</li>
  <li>Italian site: 13 lulgio 2014</li>
  </ul>
  
  <p>So the month name is translated, and the order of the elements changes as well.</p>
  
Tags: <templating><date><localization>
Title: Multilingual Dates where date format varies
ThreadText: # Multilingual Dates where date format varies
  
  (Asked by: username_0 on 2014-07-14)
  
  I have a multilingual site, and I want my dates formatted like:
  
  * English site: July 13, 2014
  * Italian site: 13 lulgio 2014
  
  So the month name is translated, and the order of the elements changes as well.
  
  **Tags:** templating, date, localization
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2014-07-14. Score: 15 | Accepted answer
  
  Craft has extended Twig's [date filter](http://twig.sensiolabs.org/doc/filters/date.html) so that it translates the output (no documentation for this, but the code is in *craft/app/etc/templating/twigextensions/CraftTwigExtension.php* around line 152). So `{{now|date('F j, Y')}}` will give **July 13, 2014** on the English site, and **luglio 13, 2014** on the Italian site. Which is half way there. In order to get the Italian date to use the Italian format (*j F Y*), we need a translation for the format string. Add this to *craft/translations/it.php*. (For more info see [Static Translations](http://buildwithcraft.com/help/static-translations)):
  
  ```
  'F j, Y' => 'j F Y',
  
  ```
  
  To output the translated date:
  
  ```
  {{now|date('F j, Y'|t)}}
  
  ```
  
  
  ---
  
  ### Answer by username_1 on 2014-07-15. Score: 1
  
  If you don't need to customized the output you can also use the Crafts datetime methods [`localeDate()`](http://buildwithcraft.com/docs/templating/datetime#localeDate) and [`localeTime()`](http://buildwithcraft.com/docs/templating/datetime#localeDate) to return a date / time in the current locale's preferred date format.
  
  ```
  {# Returns '7/15/2014' if current locale is 'en' #}
  {# Returns '15.07.2014' if current locale is 'it' #}
  {{ now.localeDate() }
  
  ```
  
  > **Comments:**
  > **username_0**: How do you set the preferred format for the locale?  
  > **username_1**: I don't think you can, @username_0. That's why your approach is better if you have a need to customize the output.  
  
  ---
  
  