Your generated documentation can be localized to any language. That means that all titles, headings and common texts are translated, e.g. "See Also", "Properties", etc. You can select the language of the output in the output options.
There is already a predefined set of languages which you can directly use. If your language is not supported, you can easily add it. All translated texts are placed in a small text file, one for each language. This file is named LOCALE_NAME.txt and must be placed in localizations folder under your template folder. The LOCALE_NAME is standard locale name, e.g. en-US or de-DE. You can find a list of all locales in _locales.txt file in localizations folder. VSdocman will automatically find this file and will offer the new language in the output options.
So to add a new language you need to create a copy of en-US.txt file and give it a proper name. Then you can open it in any text editor and translate the texts. The file format is very simple and is described below. Note, the file must be UTF-8 encoded! After you save the file you can immediately use the new language.
File format
The file format is the same as template file format. It contains only comments and macro definitions. The translated text is a value of macro. Comment is any text that is outside any macro definition. It is recommended to write a quote at the beginning of each comment line. Macro definition has two forms. Every macro name is embedded between two "$" characters e.g. $this-is-macro-name$. Macro definition starts with a macro name which must be at the beginning of a line. If the macro name does NOT start with "$vbdoc-" string, its definition continues only on that line. This is the case for most texts in the language file. The following defines macro with "NOTE: This member is now obsolete." value.
Macro value itself may contain a call to other macro. It is just macro name inside "$" characters. You don't translate these macro calls. They will be evaluated at run-time. System takes every occurrence of "$" character in any macro value as a start of macro call. There must be also terminating "$" character, otherwise an error occurs. If you want to use "$" character in the text, you must escape it by "$$". The following defines macro $MEMBERS-PAGE-TITLE$ with "$MEMBER-NAME$ Members" value. The value contains call to $MEMBER-NAME$ which will be evaluated at run-time. The resulting text will be e.g. "MyClass Members".
If a macro name starts with "$vbdoc-" string (thus complete name is "$vbdoc-rest"), its definition is all the following text until the first occurrence of "$end-vbdoc-rest" string which also must be at the beginning of a line.
|