File: refs.rst

package info (click to toggle)
sphinx-intl 2.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 340 kB
  • sloc: python: 1,162; makefile: 13
file content (51 lines) | stat: -rw-r--r-- 1,177 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
==========
References
==========

.. contents::
   :local:

Commands
========

Type `sphinx-intl` without arguments, options to show command help.

.. click:: sphinx_intl.commands:main
   :prog: sphinx-intl
   :nested: full


Environment Variables
=====================

All command-line options can be set with environment variables using the
format ``SPHINXINTL_<UPPER_LONG_NAME>``. Dashes (-) have to be replaced with
underscores (_).

For example, to set the languages::

   export SPHINXINTL_LANGUAGE=de,ja

This is the same as passing the option to sphinx-intl directly::

   sphinx-intl <command> --language=de --language=ja


Sphinx conf.py
==============

Add below settings to sphinx document's conf.py if they do not exists::

   locale_dirs = ['locale/']   #for example
   gettext_compact = False     #optional


Makefile / make.bat
===================

`make gettext` will generate pot files into `_build/gettext` directory,
however it is much convenient if pot files are generated into the
`locale/pot` directory.  You can achieve this by replacing `_build/gettext`
with `locale/pot` in your `Makefile` and/or `make.bat` that was generated
by sphinx-quickstart.