CodeWiki icon indicating copy to clipboard operation
CodeWiki copied to clipboard

Can language switching be supported?

Open Soveilove opened this issue 2 months ago • 3 comments

Can language switching be supported?

Soveilove avatar Sep 29 '26 04:09 Soveilove

Sorry, could you please provide a bit more detail? What do you mean by “language switching”?

anhnh2002 avatar Sep 29 '26 07:09 anhnh2002

Sorry, could you please provide a bit more detail? What do you mean by “language switching”?

I mean choosing the language of the generated documentation, such as Japanese. Using --instructions still leaves some content in English, and requesting translated filenames also causes “Module docs not found” warnings. Is there a recommended way to set the output language consistently?

Soveilove avatar Sep 29 '26 10:09 Soveilove

Thanks for the details. I've added a dedicated option for this in #124: codewiki generate --language ja or: Japanese, vi, zh, ko, fr, ... codewiki config agent --language ja make it your default What it does:

  • All page text, headings, tables and Mermaid diagram labels are written in the chosen language. Code, identifiers and file paths stay as they are.
  • Filenames and module names are intentionally not translated. They link the pages, the module tree, the HTML viewer and --update together. Translating them is what caused the "Module docs not found" warnings you saw. The GitHub Pages viewer shows each page's translated title in the navigation instead, so the sidebar still reads in Japanese.
  • The language is saved in metadata.json. codewiki generate --update keeps using it automatically, so updated pages stay in Japanese. To switch language, regenerate without --update.

anhnh2002 avatar Sep 30 '26 02:09 anhnh2002