@@ -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
@@ -581,9 +615,9 @@ the locale is ``C``).
581
615
582
616
When Python code uses the :mod: `locale ` module to change the locale, this also
583
617
affects the embedding application. If the embedding application doesn't want
584
- this to happen, it should remove the :mod: `_locale ` extension module (which does
618
+ this to happen, it should remove the :mod: `! _locale ` extension module (which does
585
619
all the work) from the table of built-in modules in the :file: `config.c ` file,
586
- and make sure that the :mod: `_locale ` module is not accessible as a shared
620
+ and make sure that the :mod: `! _locale ` module is not accessible as a shared
587
621
library.
588
622
589
623
@@ -597,17 +631,18 @@ Access to message catalogs
597
631
.. function :: dcgettext(domain, msg, category)
598
632
.. function :: textdomain(domain)
599
633
.. function :: bindtextdomain(domain, dir)
634
+ .. function :: bind_textdomain_codeset(domain, codeset)
600
635
601
636
The locale module exposes the C library's gettext interface on systems that
602
- provide this interface. It consists of the functions :func: `! gettext `,
603
- :func: `! dgettext `, :func: `! dcgettext `, :func: `! textdomain `, :func: `! bindtextdomain `,
604
- and :func: `! bind_textdomain_codeset `. These are similar to the same functions in
637
+ provide this interface. It consists of the functions :func: `gettext `,
638
+ :func: `dgettext `, :func: `dcgettext `, :func: `textdomain `, :func: `bindtextdomain `,
639
+ and :func: `bind_textdomain_codeset `. These are similar to the same functions in
605
640
the :mod: `gettext ` module, but use the C library's binary format for message
606
641
catalogs, and the C library's search algorithms for locating message catalogs.
607
642
608
643
Python applications should normally find no need to invoke these functions, and
609
644
should use :mod: `gettext ` instead. A known exception to this rule are
610
645
applications that link with additional C libraries which internally invoke
611
- :c:func: ` gettext ` or :c:func: ` dcgettext `. For these applications, it may be
646
+ C functions `` gettext `` or `` dcgettext ` `. For these applications, it may be
612
647
necessary to bind the text domain, so that the libraries can properly locate
613
648
their message catalogs.
0 commit comments