Skip to main content
Yanked

This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.3.0 instead.
Reason given by maintainers: Deletes the project when site_dir points to the project root or docs. Fixed in 0.2.0.

zensical-i18n

Multi-language sites for Zensical, configured like mkdocs-static-i18n.

  • One project, many languages – keep translations in docs/<locale>/ folders and build all of them into a single site, with the default language at the root and every other language below /<locale>/.
  • Language selector – a selector in the header that matches Zensical's modern and classic variants, light and dark color schemes, and takes readers to the same page in the other language when it exists.
  • Fallback to the default language – pages that aren't translated yet are taken from the default language and marked with a short notice in the reader's language.
  • Translated navigation – titles in nav are translated per language, and each language can override settings like site_name or copyright.

Quick start

Install zensical-i18n with:

pip install zensical-i18n

Put the sources of each language in a folder named after its locale. Files outside of locale folders, like images, are shared by all languages:

.
├─ docs/
│  ├─ assets/
│  │  └─ logo.svg
│  ├─ en/
│  │  ├─ index.md
│  │  └─ guide.md
│  └─ pt/
│     └─ index.md
└─ zensical.toml

Each locale folder is treated as the docs root, so docs/pt/index.md links to assets/logo.svg and guide.md. Then, add the languages to zensical.toml:

[project]
site_name = "Documentation"
site_url = "https://example.com/"
nav = [
  { "Get started" = "index.md" },
  { "Guide" = "guide.md" },
]

[project.plugins.i18n]

[[project.plugins.i18n.languages]]
locale = "en"
name = "English"
default = true

[[project.plugins.i18n.languages]]
locale = "pt"
name = "Português"
site_name = "Documentação"

[project.plugins.i18n.languages.nav_translations]
"Get started" = "Comece aqui"
"Guide" = "Guia"

Build the site with:

zensical-i18n build

This builds site/ with English at the root and Portuguese in site/pt/. As docs/pt/guide.md doesn't exist, the English guide is used instead, with a notice that it hasn't been translated yet.

While writing, preview a language with live reload:

zensical-i18n serve --lang pt

Using mkdocs.yml

Projects using mkdocs.yml are supported as well, using the same settings as mkdocs-static-i18n:

plugins:
  - search
  - i18n:
      docs_structure: folder
      languages:
        - locale: en
          name: English
          default: true
        - locale: pt
          name: Português
          site_name: Documentação
          nav_translations:
            Get started: Comece aqui

Commands

Command Description
zensical-i18n build Build all languages into a single site
zensical-i18n serve Build and serve a language with live reload

Both commands accept the options of the corresponding zensical commands, like --config-file, --clean, --strict or --dev-addr, as well as:

  • build --lang <locale> – build only the given language, which can be repeated. The other languages in site/ are left untouched.
  • serve --lang <locale> – serve the given language instead of the default.

Settings

Plugin settings:

Setting Default Description
languages – Languages of the project, see below
docs_structure folder Only folder is supported
fallback_to_default true Use pages of the default language when missing
reconfigure_theme true Add the language selector and untranslated page notice. reconfigure_material is supported as an alias

Language settings:

Setting Description
locale Locale and folder name, e.g. en or pt-BR. Also sets theme.language
name Name shown in the language selector
default Whether this is the default language, built to the site root. Defaults to the first language
build Whether to build the language, defaults to true
link Link in the language selector, e.g., to an external site
nav_translations Mapping of nav titles to their translations
untranslated_notice Notice on pages that fall back to the default language, with {language} replaced by its name
site_name, site_description, site_author, copyright, nav Override the project setting
theme, extra Merged into the project setting

How it works

Zensical doesn't have plugin hooks yet, so zensical-i18n runs Zensical once per language:

  1. Staging – the sources of each language are mirrored into .zensical-i18n/docs/<locale>/, layering the language's files over those of the default language and the shared files.
  2. Building – Zensical builds each language in a separate process, with the language's settings merged in after Zensical has parsed the config file, so YAML tags, INHERIT and relative paths keep working. Each language has its own cache, so incremental builds stay fast.
  3. Assembling – the outputs are merged into site_dir, with the default language at the root and all others below their locale.

The language selector reads zensical-i18n.json, a manifest of the pages of all languages written to each language's root. Without JavaScript, the selector links to the home page of each language.

Add .zensical-i18n to your .gitignore.

Limitations

  • Only the folder structure is supported, not suffixes like index.pt.md.
  • Search covers the language that is currently shown.
  • serve previews one language at a time.
  • admonition_translations of mkdocs-static-i18n isn't supported.

Contributing

Commit messages follow the format <type>: <summary>, where type is one of feature, fix, performance, refactor, docs, test, chore, build or ci. Run the checks with:

uv sync --all-groups
uv run ruff check . && uv run ruff format --check .
uv run ty check .
uv run pytest

Releasing

New versions are released through pull requests:

  1. Create a branch named release/v<version>, e.g., release/v0.2.0.
  2. Bump version in pyproject.toml, run uv lock, and commit both with the message chore: release v<version> – the branch must contain exactly this one commit.
  3. Open a pull request against master. Once it's merged, the tag, the GitHub release and the upload to PyPI are created automatically.

License

MIT License

Copyright (c) 2026 Humberto Sandmann and contributors

Metadata

Release files for zensical-i18n 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zensical-i18n 0.1.0
File Size Uploaded Provenance Actions
zensical_i18n-0.1.0.tar.gz 20.5 kB With provenance Details for zensical_i18n-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for zensical-i18n 0.1.0
File Interpreter ABI Platform Actions
zensical_i18n-0.1.0-py3-none-any.whl Python 3 none any Details for zensical_i18n-0.1.0-py3-none-any.whl

Total release size: 51.7 kB

Release files / zensical_i18n-0.1.0.tar.gz

Download URL zensical_i18n-0.1.0.tar.gz
Size 20.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cfa68bd0eff8cb93e14255c8c58bc34cda9f67d874dd02e9efb1015297062e51
BLAKE2b-256 checksum
How to use checksums
a4415948508138f3aee12e83f81a58422a67e7e70d2fc02425b4df1bd04d8cbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Release files / zensical_i18n-0.1.0-py3-none-any.whl

Download URL zensical_i18n-0.1.0-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
607cb56fdae1f58a68de9431af241cf90d348d9624d8cca7fb5f7220b748b06c
BLAKE2b-256 checksum
How to use checksums
b707c1cf24b36392b4de6f6575a44564dc5cd5dcd6e1351202eadc802348850a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

Security for zensical-i18n 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for zensical_i18n-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page