diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2010-10-11 12:32:33 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2010-10-11 12:32:33 +0000 |
| commit | 0ac9411fdf556611215e5ddb1e5054b76609f959 (patch) | |
| tree | e3612c35822eb745c0a8aa27152e13903fab3b74 /docutils/docs | |
| parent | f5baaccd9ea50f2cd6e2ac39f2fb8ed3e5975c71 (diff) | |
| download | docutils-0ac9411fdf556611215e5ddb1e5054b76609f959.tar.gz | |
Support language specification for document objects.
Class arguments in the form "language-<language tag>", e.g.
``.. class:: language-el-polyton`` for a quote in polytonic Greek
are handled by the html and latex writers to set the language of the
"classified" object.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@6443 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/docs')
| -rw-r--r-- | docutils/docs/dev/todo.txt | 14 | ||||
| -rw-r--r-- | docutils/docs/user/config.txt | 11 |
2 files changed, 24 insertions, 1 deletions
diff --git a/docutils/docs/dev/todo.txt b/docutils/docs/dev/todo.txt index b428fb77e..5e4fe786f 100644 --- a/docutils/docs/dev/todo.txt +++ b/docutils/docs/dev/todo.txt @@ -155,6 +155,8 @@ General - I18n needs refactoring, the language dictionaries are difficult to maintain. Maybe have a look at gettext or similar tools. + (This would make a nice Google Summer of Code project) + - Language modules: in accented languages it may be useful to have both accented and unaccented entries in the ``bibliographic_fields`` mapping for versatility. @@ -162,10 +164,22 @@ General - Add a "--strict-language" option & setting: no English fallback for language-dependent features. + Make this the default for output (as opposed to input)? + Throw an error with a helpfull message, e.g. + + Default "contents" title for language %s missing, please specify + an explicit title. + + or + + "attention" title for language %s missing, please use a generic + admonition with explicit title. + - Add internationalization to _`footer boilerplate text` (resulting from "--generator", "--source-link", and "--date" etc.), allowing translations. + * Add validation? See http://pytrex.sourceforge.net, RELAX NG, pyRXP. * In ``docutils.readers.get_reader_class`` (& ``parsers`` & diff --git a/docutils/docs/user/config.txt b/docutils/docs/user/config.txt index c5f1b4a6b..677a32a54 100644 --- a/docutils/docs/user/config.txt +++ b/docutils/docs/user/config.txt @@ -321,6 +321,9 @@ _`input_encoding_error_handler` _`language_code` Case-insensitive `language tag`_ as defined in `BCP 47`_. + Sets the document language, also used for localized directive and + role names as well as Docutils-generated text. + A typical language identifier consists of a 2-letter language code from `ISO 639`_ (3-letter codes can be used if no 2-letter code exists). The language identifier can have an optional subtag, @@ -328,10 +331,16 @@ _`language_code` 2-letter country codes). Avoid subtags except where they add useful distinguishing information. Examples of language tags include "fr", "en-GB", "pt_br" (the same as "pt-BR"), and - "de-1901". + "de-1901" (German with pre-1998 spelling). + + The language of document parts can be specified with a + "language-<language tag>" `class attribute`_, e.g. + ``.. class:: language-el-polyton`` for a quote in polytonic Greek. Default: English ("en"). Options: ``--language, -l``. + .. _class attribute: ../ref/doctree.html#classes + _`output_encoding` The text encoding for output. |
