dwww Home | Show directory contents | Find package

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 &auml; 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.

Generated by dwww version 1.15 on Sat May 18 13:06:20 CEST 2024.