Doku-Base
Texi2html Linux Dokumentation
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

7.6 Customizing strings written by texi2html

texi2html writes some strings in the generated document at various places, at the page footers, on the help page, for special section headings, buttons alt text and so on. These strings are customizable. The string chosen depends on the language of the document (set by --lang’, $LANG or @documentlanguage). This is the basis for internationalization as it allows for strings translations.

The strings are found in a hash reference, $LANGUAGES. Each key is a language code. The associated value is also a hash reference. The key is an english string and the associated value is the string replacing the english string, if present. For example, we have

 
$LANGUAGES->{'fr'} = {
              ' Up ' => 'Plus haut',
};

It means that whenever the string ‘ Up ’ is to be written and the language is ‘fr’, ‘Plus haut’ is written. It is possible to customize the english strings by redefining the ‘en’ language hash.

When a string contains a ‘%’ followed by ‘{name}’ it means that the string will be expanded by texi2html. For example, if we have

 
$LANGUAGES->{'fr'} = {
              'See %{node_file_href}' => 'Voir %{node_file_href}',
};

%{node_file_href}’ will be expanded to an href for a node in a file by texi2html in the string. A ‘%%’ will be expanded as ‘%’.

For more on internationalization, see Internationalization.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]


Doku-Base

This document was created by Netzdino using texi2html.