blob: 411f4b1d0c7eb23fe390852a4ba98df341471c69 (
plain)
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
|
This short howto explains how to add support for a new language to Doxygen:
Just follow these steps:
1) Tell me which language you want to add support for. If no one else
is already working on support for that language, you will be
assigned as the maintainer for the language. I'll create a
list on Doxygen's homepage, so everyone knows who is doing what.
2) Edit src/config.xml:
- find the <option> with id='OUTPUT_LANGUAGE'
- add a new value with your language and an optional description:
<value name='YourLanguage' desc='(only for disambiguation)'/>
3) Create a copy of translator_en.h and name it
translator_<your_2_letter_country_code>.h
I'll use xx in the rest of this document.
4) Edit language.cpp:
- Add an include block:
#include "translator_xx.h"
- In setTranslator() add
case OUTPUT_LANGUAGE_t::YourLanguage: theTranslator = new TranslatorYourLanguage; break;
5) Edit translator_xx.h:
- Change TRANSLATOR_EN_H to TRANSLATOR_XX_H (in both the #include line and
the #define line).
- Change TranslatorEnglish to TranslatorYourLanguage
- In the member idLanguage() change "english" into the name of your
language (use lower case characters only). Set the trISOLang() and
getLanguageString() return values to match your language as well. Depending on the
language you may also wish to change the member function latexLanguageSupportCommand().
- Edit all the strings that are returned by the members that start
with tr. Try to match punctuation and capitals!
To enter special characters (with accents) you can:
a) Enter them directly and store the files using UTF-8 encoding.
b) Use html codes like ä for an a with an umlaut (i.e. รค).
See the HTML specification for the codes.
6) Change to your build directory and build again in order to regenerate the binary e.g.:
cd path/where/you/build
cmake --build .
7) Now you can use OUTPUT_LANGUAGE = your_language_name
in the config file to generate output in your language.
8) Send translator_xx.h to me so I can add it to doxygen.
Send also your name and e-mail address to be included in the
maintainers.txt list.
Good luck, and let me know if there are problems.
|