Saturday, March 29, 2008

Multi-language Document

XOOPS Cube has Doxygen document in English. minahito_sandbox of XCube_PHP4 tries to apply multi-language to documents. Of course, it needs to prepare translated documents.

The schema is very simple. In doxygen, it's possible to write document comments on different place from source code. For example, you may have the file including the following comments at different place from program:

* @class XCube_Root
* @brief ....
* @function getRenderSystem
* @brief ...
* @param ...

However, doxygen can not know signatures of functions with only such files. So it gets important informations like signatues from source code. As you know, in doxygen, document comments are embedded to source code normally.

The multi-language examination uses this doxygen's feature. Our shell command removes original comments from source code, and adds files including only comments in Japanese to doxygen. You can generate documents with 'make' right now.

make doxygen
make doxygen_ja

When you try to generate none-default languages (not English), makefile will use unix/linux command. So you need bash environment. If your OS is Mac OS X, terminal supplies bash environment to you. Don't forget to install doxygen so that it's possible to call doxygen CUI from terminal. If your OS is windows OS, cygiwn is good environments for you.

1 comment:

C said...

This comment is not for content, sorry.
To clarify that it is a diatomic molecule, O2 is often called dioxygen.
We sometimes call it "Bunshizyou Sanso" in Japanese.
Therefore, I thought that "doxygen" was spelling error.