mkdocs-mdpo-plugin
Translations for Mkdocs using PO files, fully customizable. Compatible with mkdocs-material, based on mdpo.
Documentation: en - es
Install
pip install mkdocs-mdpo-plugin
Usage
Enable the plugin in your mkdocs.yml:
plugins:
- mdpo
Minimal configuration
With mkdocs-material
theme:
name: material
language: en
extra:
alternate:
- name: English
lang: en
- name: Español
link: es
lang: es
plugins:
- mdpo
Standalone
plugins:
- mdpo:
languages:
- en # first language is the original
- es
Both previous configurations will create the same layout of files building the
documentation. Given the next layout in a docs/ directory:
📁 docs
└── 📄 index.md
After the build, you will get:
📁 docs
├── 📁 es
│ └── 📄 index.md.po
└── 📄 index.md
Just translate the strings in docs/es/index.md.po into Spanish, build again
with mkdocs build and the site/ directory will look like:
📁 site
├── 📄 404.html
├── 📁 assets
│ ├── 📁 images
│ ├── 📁 javascripts
│ └── 📁 stylesheets
├── 📁 es
│ └── 📄 index.html
├── 📄 index.html
├── 📄 sitemap.xml
└── 📄 sitemap.xml.gz
Simple and easy. The extraction of messages process and the produced layout are fully customizable, you can even translate code blocks! Check the full documentation here.
Metadata
Release files for mkdocs-mdpo-plugin 0.0.27
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| mkdocs_mdpo_plugin-0.0.27.linux-x86_64.tar.gz | 40.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mkdocs_mdpo_plugin-0.0.27-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 64.6 kB
Release files / mkdocs_mdpo_plugin-0.0.27.linux-x86_64.tar.gz
| Download URL | mkdocs_mdpo_plugin-0.0.27.linux-x86_64.tar.gz |
|---|---|
| Size | 40.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7781fdb9118d0edf827e1b5ad843ed5922cc380c4d36a3075a4bc673c492f728
|
|
BLAKE2b-256 checksum How to use checksums |
85d3f03b3bd0e3a4c1b8163731c525c41b342ed6fc891adf5d843f3de61e53fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.13
|
Release files / mkdocs_mdpo_plugin-0.0.27-py3-none-any.whl
| Download URL | mkdocs_mdpo_plugin-0.0.27-py3-none-any.whl |
|---|---|
| Size | 24.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2faa1cc0f2b2c62b7b4b812334888e44c2a534fde525fc41e9f6914a722ed2fc
|
|
BLAKE2b-256 checksum How to use checksums |
b1c8c4fc3d318e404755b0800d09a043b68db179e671e7018f49f236787bf6b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.7.13
|