Reputation: 4453
My client gave me unusual (and non-negotiable) requirement to provide them with dual-language (English and Polish) doxygen documentation from C++ code.
My first idea is to use conditional compilation for comments, like:
#if DOXYGEN_ENGLISH
/**
* @brief Sample method
*/
#elif DOXYGEN_POLISH
/**
* @brief Przykładowa metoda
*/
#endif
void foo();
Then run Doxygen twice with different base locale and predefined constant... and it actually works. But it's very cumbersome...
Have someone has an idea how can I improve this solution? Or solve it different way?
Upvotes: 4
Views: 3674
Reputation: 9047
Doxygen has the build in command \~[langId] for handling different languages. The above presented example could be formulated as:
/**
* \~english @brief Sample method
* \~polish @brief Przykladowa metoda
*/
void foo();
Upvotes: 8