@@ -18,7 +18,7 @@ know all the specifics of each country where the software is executed.
18
18
19
19
.. index :: pair: module; _locale
20
20
21
- The :mod: `locale ` module is implemented on top of the :mod: `_locale ` module,
21
+ The :mod: `locale ` module is implemented on top of the :mod: `! _locale ` module,
22
22
which in turn uses an ANSI C locale implementation if available.
23
23
24
24
The :mod: `locale ` module defines the following exception and functions:
@@ -192,7 +192,13 @@ The :mod:`locale` module defines the following exception and functions:
192
192
Get a format string for :func: `time.strftime ` to represent time in the am/pm
193
193
format.
194
194
195
- .. data :: DAY_1 ... DAY_7
195
+ .. data :: DAY_1
196
+ DAY_2
197
+ DAY_3
198
+ DAY_4
199
+ DAY_5
200
+ DAY_6
201
+ DAY_7
196
202
197
203
Get the name of the n-th day of the week.
198
204
@@ -202,15 +208,43 @@ The :mod:`locale` module defines the following exception and functions:
202
208
international convention (ISO 8601) that Monday is the first day of the
203
209
week.
204
210
205
- .. data :: ABDAY_1 ... ABDAY_7
211
+ .. data :: ABDAY_1
212
+ ABDAY_2
213
+ ABDAY_3
214
+ ABDAY_4
215
+ ABDAY_5
216
+ ABDAY_6
217
+ ABDAY_7
206
218
207
219
Get the abbreviated name of the n-th day of the week.
208
220
209
- .. data :: MON_1 ... MON_12
221
+ .. data :: MON_1
222
+ MON_2
223
+ MON_3
224
+ MON_4
225
+ MON_5
226
+ MON_6
227
+ MON_7
228
+ MON_8
229
+ MON_9
230
+ MON_10
231
+ MON_11
232
+ MON_12
210
233
211
234
Get the name of the n-th month.
212
235
213
- .. data :: ABMON_1 ... ABMON_12
236
+ .. data :: ABMON_1
237
+ ABMON_2
238
+ ABMON_3
239
+ ABMON_4
240
+ ABMON_5
241
+ ABMON_6
242
+ ABMON_7
243
+ ABMON_8
244
+ ABMON_9
245
+ ABMON_10
246
+ ABMON_11
247
+ ABMON_12
214
248
215
249
Get the abbreviated name of the n-th month.
216
250
@@ -229,14 +263,14 @@ The :mod:`locale` module defines the following exception and functions:
229
263
230
264
.. data :: NOEXPR
231
265
232
- Get a regular expression that can be used with the regex(3) function to
266
+ Get a regular expression that can be used with the `` regex(3) `` function to
233
267
recognize a negative response to a yes/no question.
234
268
235
269
.. note ::
236
270
237
271
The regular expressions for :const: `YESEXPR ` and
238
272
:const: `NOEXPR ` use syntax suitable for the
239
- :c:func: ` regex ` function from the C library, which might
273
+ `` regex ` ` function from the C library, which might
240
274
differ from the syntax used in :mod: `re `.
241
275
242
276
.. data :: CRNCYSTR
@@ -591,9 +625,9 @@ the locale is ``C``).
591
625
592
626
When Python code uses the :mod: `locale ` module to change the locale, this also
593
627
affects the embedding application. If the embedding application doesn't want
594
- this to happen, it should remove the :mod: `_locale ` extension module (which does
628
+ this to happen, it should remove the :mod: `! _locale ` extension module (which does
595
629
all the work) from the table of built-in modules in the :file: `config.c ` file,
596
- and make sure that the :mod: `_locale ` module is not accessible as a shared
630
+ and make sure that the :mod: `! _locale ` module is not accessible as a shared
597
631
library.
598
632
599
633
@@ -607,17 +641,18 @@ Access to message catalogs
607
641
.. function :: dcgettext(domain, msg, category)
608
642
.. function :: textdomain(domain)
609
643
.. function :: bindtextdomain(domain, dir)
644
+ .. function :: bind_textdomain_codeset(domain, codeset)
610
645
611
646
The locale module exposes the C library's gettext interface on systems that
612
- provide this interface. It consists of the functions :func: `! gettext `,
613
- :func: `! dgettext `, :func: `! dcgettext `, :func: `! textdomain `, :func: `! bindtextdomain `,
614
- and :func: `! bind_textdomain_codeset `. These are similar to the same functions in
647
+ provide this interface. It consists of the functions :func: `gettext `,
648
+ :func: `dgettext `, :func: `dcgettext `, :func: `textdomain `, :func: `bindtextdomain `,
649
+ and :func: `bind_textdomain_codeset `. These are similar to the same functions in
615
650
the :mod: `gettext ` module, but use the C library's binary format for message
616
651
catalogs, and the C library's search algorithms for locating message catalogs.
617
652
618
653
Python applications should normally find no need to invoke these functions, and
619
654
should use :mod: `gettext ` instead. A known exception to this rule are
620
655
applications that link with additional C libraries which internally invoke
621
- :c:func: ` gettext ` or :c:func: ` dcgettext `. For these applications, it may be
656
+ C functions `` gettext `` or `` dcgettext ` `. For these applications, it may be
622
657
necessary to bind the text domain, so that the libraries can properly locate
623
658
their message catalogs.
0 commit comments