title: Python locale settings on Heroku
body: <p>I'm developing a python web application on <a href="http://www.heroku.com/" rel="nofollow">Heroku</a> and I'm facing a problem with the locale settings.</p>
  
  <p>My aim ist to format a python <code>datetime</code> object as a string like this</p>
  
  <pre><code>import datetime
  now = datetime.datetime.now()
  print now.strftime('%a %d %B %Y')  # output: Sat 14 July 2012
  </code></pre>
  
  <p>but in different languages.</p>
  
  <p>On my local machine I use therefore:</p>
  
  <pre><code>import locale
  locale.setlocale(locale.LC_ALL, '')
  </code></pre>
  
  <p>or <code>locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')</code> for specific languages.</p>
  
  <p>On my local machine this works and I get the date in the right language but on Heroku it fails and all I get is a <code>locale.Error: unsupported locale settings</code>.</p>
  
  <p>Am I doing something wrong or is it permitted to change locale setting in a python app on Heroku?</p>
  
  <p>Thanks.</p>