5

I need to write a manual to the software I made. If it possible to use gettext when writing a manual, or other documents?

2 Answers 2

5

Check out Sphinx to write your documents in reStructuredText and make them translatable in gettext format.

1
  • 1
    Exactly what I've been looking for. Thanks for answering even though the question is very old! Oct 10, 2011 at 18:30
2

afaik gettext is useful when you have a programming language which contains strings, that is when strings are intermixed with code.

alert(_("Hello"));

Then a preprocessor finds all occurrences of _("..") and generates a .po template and then you copy that edit that .po file translating "Hello" to your language:

msgid "Hello"
msgstr "Cześć"

gettext is aimed to solve the problems you encounter when you use string inside a programming language, typically format strings with positional arguments, plurals, duals (some languages have duals), etc, stuff which might change the translation due to runtime parameters.

This kind of things is not necessary on manuals, because manuals normally don't have runtime parameters which change the sentences.

The only advantage I see of using gettext would be to preserve markup, but usually markup (in latex, docbook etc) is an operation that defines your structure so it's part of the semantics of your documentation, while the appareance should be handled in a different place (css, etc).

I don't feel that the ability to isolate the translation from the markup will be a big advantage, considering the noise that xgettext tags will introduce in your documentation markup language.

(Furthermore I don't know of any tools that would preprocess and postprocess latex/docbook/whatever with gettext)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .