Skip to content

Commit 9cb876a

Browse files
authored
Merge pull request #118 from wodim/patch-1
Change module name in docs to flask_babel
2 parents 5e10cfe + 2eafaa1 commit 9cb876a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Flask-Babel
22
===========
33

4-
.. module:: flask.ext.babel
4+
.. module:: flask_babel
55

66
Flask-Babel is an extension to `Flask`_ that adds i18n and l10n support to
77
any Flask application with the help of `babel`_, `pytz`_ and
@@ -31,7 +31,7 @@ To get started all you need to do is to instanciate a :class:`Babel`
3131
object after configuring the application::
3232

3333
from flask import Flask
34-
from flask.ext.babel import Babel
34+
from flask_babel import Babel
3535

3636
app = Flask(__name__)
3737
app.config.from_pyfile('mysettings.cfg')
@@ -112,7 +112,7 @@ To play with the date formatting from the console, you can use the
112112

113113
Here some examples:
114114

115-
>>> from flask.ext.babel import format_datetime
115+
>>> from flask_babel import format_datetime
116116
>>> from datetime import datetime
117117
>>> format_datetime(datetime(1987, 3, 5, 17, 12))
118118
u'Mar 5, 1987 5:12:00 PM'
@@ -128,7 +128,7 @@ u'05 12 1987'
128128
And again with a different language:
129129

130130
>>> app.config['BABEL_DEFAULT_LOCALE'] = 'de'
131-
>>> from flask.ext.babel import refresh; refresh()
131+
>>> from flask_babel import refresh; refresh()
132132
>>> format_datetime(datetime(1987, 3, 5, 17, 12), 'EEEE, d. MMMM yyyy H:mm')
133133
u'Donnerstag, 5. M\xe4rz 1987 17:12'
134134

@@ -148,7 +148,7 @@ There are two functions responsible for translating: :func:`gettext` and
148148
:func:`ngettext`. The first to translate singular strings and the second
149149
to translate strings that might become plural. Here some examples::
150150

151-
from flask.ext.babel import gettext, ngettext
151+
from flask_babel import gettext, ngettext
152152

153153
gettext(u'A simple string')
154154
gettext(u'Value: %(value)s', value=42)
@@ -159,7 +159,7 @@ application and define them outside of a request, you can use a lazy
159159
strings. Lazy strings will not be evaluated until they are actually used.
160160
To use such a lazy string, use the :func:`lazy_gettext` function::
161161

162-
from flask.ext.babel import lazy_gettext
162+
from flask_babel import lazy_gettext
163163

164164
class MyForm(formlibrary.FormBase):
165165
success_message = lazy_gettext(u'The form was successfully saved.')

0 commit comments

Comments
 (0)