Skip to content

Commit

Permalink
Added workaround for OS X
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsuhiko committed May 29, 2010
1 parent 7061764 commit 2e01a62
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Flask Babel

Description goes here
Implements i18n and l10n support for Flask. This is based on the Python
babel module as well as pytz both of which are installed automatically
for you if you install this library.
7 changes: 7 additions & 0 deletions flaskext/babel.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import os

# this is a workaround for a snow leopard bug that babel does not
# work around :)
if os.environ.get('LC_CTYPE', '').lower() == 'utf-8':
os.environ['LC_CTYPE'] = 'en_US.utf-8'

from datetime import datetime
from flask import _request_ctx_stack
from babel import dates, Locale
Expand Down
Binary file modified flaskext/babel.pyc
Binary file not shown.

0 comments on commit 2e01a62

Please sign in to comment.