Fix for UBSan build
[platform/upstream/doxygen.git] / LANGUAGE.HOWTO
1 This short howto explains how to add support for a new language to Doxygen:
2
3 Just follow these steps:
4
5 1) Tell me which language you want to add support for. If no one else
6    is already working on support for that language, you will be 
7    assigned as the maintainer for the language. I'll create a 
8    list on Doxygen's homepage, so everyone knows who is doing what.
9 2) Create a copy of translator_en.h and name it 
10    translator_<your_2_letter_country_code>.h
11    I'll use xx in the rest of this document.
12 3) Edit language.cpp:
13    - Add a #include<translator_xx.h> 
14    - In setTranslator() add
15      
16      else if (L_EQUAL("your_language_name"))
17      {
18        theTranslator = new TranslatorYourLanguage;
19      }
20    
21      after the if { ... }
22 4) Edit libdoxygen.pro.in and add translator_xx.h to the HEADERS line.
23 5) Edit translator_xx.h:
24    - Change TRANSLATOR_EN_H to TRANSLATOR_XX_H (in both the #include line and
25      the #define line).
26    - Change TranslatorEnglish to TranslatorYourLanguage 
27    - In the member idLanguage() change "english" into the name of your
28      language (use lower case characters only). Depending on the language you
29      may also wish to change the member functions latexLanguageSupportCommand()
30      and idLanguageCharset().
31    - Edit all the strings that are returned by the members that start
32      with tr. Try to match punctuation and capitals!
33      To enter special characters (with accents) you can:
34         a) Enter them directly if your keyboard supports that and you are 
35            using a Latin-1 font.
36            Doxygen will translate the characters to proper Latex and
37            leave the Html and man output for what it is (which is fine, if
38            idLanguageCharset() is set correctly).
39         b) Use html codes like &auml; for an a with an umlaut (i.e. รค).
40            See the HTML specification for the codes.
41 6) Run configure and make again from the root of the distribution, 
42    in order to regenerate the Makefiles.
43 7) Now you can use OUTPUT_LANGUAGE = your_language_name 
44    in the config file to generate output in your language.
45 8) Send translator_xx.h to me so I can add it to doxygen.
46    Send also your name and e-mail address to be included in the
47    maintainers.txt list.
48
49 Good luck, and let me know if there are problems.
50