Clang wrapper with i18n support

This is a long-standing problem in clang/llvm since the diagnostic/help messages are hard-coded in cpp/td code.

I created a plugin for dynamic linked clang/LLVM to translate diagnostic/help messages in English into other languages. This is convenient for users because they don’t need to rebuild the whole Clang project.

GitHub link: GitHub - dtcxzyw/clang-i18n: Clang wrapper with i18n support Clang国际化支持插件

This is just a weekend project, but I think it may be helpful for someone :slight_smile:

Currently, only the Chinese translation is available. It just takes several hours to finish the EN to CN translation with the aid of LLM. All kinds of contributions are welcome.

Enjoy yourself!

6 Likes

It also works with the clangd extension in VSCode:

1 Like

Available translations (Only zh_CN is manually reviewed):
zh_CN Chinese - Simplified
zh_TW Chinese - Traditional
fr_FR. French
de_DE German
ja_JP Japanese
ko_KR Korean
pt_BR Portuguese
ru_RU Russian
es_ES Spanish