#3192·zola

Feature Request: Support Internationalization with Gettext

Author: hwhsu1231Created Jul 12, 2026Updated Sep 24, 2026

Hello @getzola community,

I am the author of the @localizethedocs organization, which specializes in establishing localization infrastructure for open-source documentation. We have already developed scalable workflows for numerous Sphinx and mdBook projects:

If Zola introduces Gettext-based internationalization (i18n), I will be able to expand our support to include documentation built with Zola. Below are the details of this feature request.

Feature Request

Implement a Gettext-based workflow that allows users to extract translatable source strings from Zola-based documentation into .pot files. During the build process, the system should be able to reference translated .po files to generate localized versions of the documentation.

I propose adding the following arguments to the zola build command to facilitate automated localization:

  • --pot or --gettext: Generates .pot files from the source.
  • --language <lang>: Specifies the target language for the build.
  • --locale-dir <dir>: Defines the directory containing the locale-specific data.

with the expected workflow:

bash
# 1. Generate .pot files to the './out/pot' directory.
zola build --pot --output-dir ./out/pot

# 2. Convert .pot to the language-specific .po files inside 'locale' directory.
# 
# ```
# out/
#     pot/
#         guide.pot
#         index.pot
#         zola.pot
# locale/
#     zh_CN/
#         LC_MESSAGES/
#             guide.po
#             index.po
#             zola.po
#     zh_TW/
#         LC_MESSAGES/
#             guide.po
#             index.po
#             zola.po
# content/
#     guide.md
#     _index.md
# config.toml
# ```

# 3. Build the documentation with the .po files in './locale/zh_TW' directory.
zola build --language zh_TW --locale-dir ./locale --output-dir ./out/html/

The proposed workflow aligns with Sphinx's Internationalization with Gettext feature, as illustrated in its official documentation:

Image

This implementation allows core maintainers to focus exclusively on English source content. Meanwhile, the localization process can be decoupled and managed in independent downstream repositories (just like what @localizethedocs does), preventing the upstream project history from being overwhelmed by translation-related commits.

Previous Discussions

I noticed that the Zola community has previously discussed implementing internationalization features:

At the time, community proposals suggested using either Fluent or Gettext as the underlying engine for Zola's internationalization. However, it seems that little progress has been made since then.

If I were to vote today on whether to use Fluent or Gettext for internationalization, I would choose Gettext without hesitation. It's because Gettext comes with a mature and stable suite of utilities (xgettext, msgmerge, msgcat, etc.) that allow users to combine scripts with CI/CD to build workflows that automatically update translation progress.

I hope this feature request offers a different perspective on implementing internationalization in Zola.