Академический Документы
Профессиональный Документы
Культура Документы
Markus Zapke-Grndemann
Software Developer since 2001 Python, Django, Open Data and Training Independent since 2008 Owner of transcode keimlink.de // @keimlink
Basics
Sphinx
Python Documentation Generator Markup Language: reStructuredText Output Formats: HTML, LaTeX (PDF), ePub, Texinfo, manual pages, plain text sphinx-doc.org
Internationalization
Often referred to as i18n Translating into other languages without changing the code GNU gettext is used frequently
gettext Example
import gettext! t = gettext.translation('example', 'locale', fallback=True)! _ = t.ugettext! print _('Write the Docs')
Sphinx Internationalization
Source: http://sphinx-doc.org/intl.html
sphinx-intl
https://pypi.python.org/pypi/sphinx-intl
sphinx-intl
$ make gettext! $ sphinx-intl update -l de -p _build/locale! # Translate documentation! $ sphinx-intl build! $ make SPHINXOPTS="-Dlanguage=de" html
Transifex
www.transifex.com
Transifex Setup
class Bookmark(models.Model):! url = models.URLField()! title = models.CharField('title', max_length=255)! description = models.TextField('description', blank=True)
Alternatively, you can get the `Python Sources <http://python.org/ download/>`_ from the website and compile it! yourself.!
!
Alternatively, you can get the `Python Sources`_ from the website and compile it yourself.!
!
You can find a list of all ``QuerySet`` methods in the :djangodocs:`documentation <ref/ models/querysets/#queryset-api>`.!
!
Download the :djangopdf:`Django Offline PDF Documentation <>` which has currently more than 1,200 pages.
Link checking
You can check the links for each language separately:
!
Sphinx 1.3
Merge sphinx-intl into Sphinx Move Transifex support from sphinx-intl to a new extension Allow to build all languages with a single command
Thanks!
!
www.transcode.de @keimlink