I'm developing a python web application on Heroku and I'm facing a problem with the locale settings.
My aim ist to format a python datetime
object as a string like this
import datetime
now = datetime.datetime.now()
print now.strftime('%a %d %B %Y') # output: Sat 14 July 2012
but in different languages.
On my local machine I use therefore:
import locale
locale.setlocale(locale.LC_ALL, '')
or locale.setlocale(locale.LC_ALL, 'de_DE.UTF-8')
for specific languages.
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 locale.Error: unsupported locale settings
.
Am I doing something wrong or is it permitted to change locale setting in a python app on Heroku?
Thanks.