zk-jargon-decoder icon indicating copy to clipboard operation
zk-jargon-decoder copied to clipboard

Add multi-language support using mdbook-i18n-helpers

Open Mameta29 opened this issue 6 months ago • 3 comments

This PR adds multi-language support to the project using mdbook-i18n-helpers. This lays the groundwork for creating translations of the documentation, starting with Japanese.

Changes implemented:

  • Installed mdbook-i18n-helpers
  • Updated book.toml to include gettext preprocessor
  • Created initial PO template file
  • Updated README with instructions for translators

To test:

  1. Install mdbook-i18n-helpers: cargo install mdbook-i18n-helpers
  2. Generate POT file: MDBOOK_OUTPUT='{"xgettext": {}}' mdbook build -d po
  3. Create a PO file for a new language (e.g., Japanese): msginit -i po/messages.pot -l ja -o po/ja.po
  4. Add some translations to po/ja.po
  5. Build the Japanese version: MDBOOK_BOOK__LANGUAGE=ja mdbook build -d book/ja

Mameta29 avatar Aug 12 '24 03:08 Mameta29