MkDocs i18n plugin using static translation markdown files
Project description
MkDocs Static I18n Plugin
An MkDoc plugin that helps you get add multilang support to your site / documentation.
The mkdocs-static-i18n
plugin allows you to support multiple languages on your documentation by adding static translation files to your existing documentation pages. Multi language support is just one .<language>.md
file away!.
This plugin is made to be as simple as possible and will use any default page provided if there is no translation available for it!
When activated, you will get default version of your website using the default_language
configured + one version available on /<language>/
for every language configured in the languages
parameter.
For example, using the following configuration on the given structure:
plugins:
- i18n:
default_language: en
languages:
en: 'english'
fr: 'français'
docs_i18n
├── coconut
│ ├── index.en.md
│ └── index.fr.md
├── index.fr.md
└── index.md
Will build the following site (leaving out static files for readability):
site
├── coconut
│ └── index.html
├── en
│ ├── coconut
│ │ └── index.html
│ └── index.html
├── fr
│ ├── coconut
│ │ └── index.html
│ └── index.html
├── index.html
This plugin is compatible with the MkDocs Awesome Pages Plugin!
Configuration
All the parameters are mandatory:
- default_language: string
- languages: mapping of language name: display value
TODO
- add docs folder + mkdocs.yml example
- add mkdocs-material example with language switcher buttons
Contributions welcome!
Feel free to ask questions, enhancements and to contribute to this project!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file mkdocs-static-i18n-0.1.tar.gz
.
File metadata
- Download URL: mkdocs-static-i18n-0.1.tar.gz
- Upload date:
- Size: 4.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.2 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0559175dbfe424538f07dd2f7dbd617d525f487823ba70cdfa77d70e1907e866 |
|
MD5 | 4899042f4ab01b4df2ce79c3d0119c3c |
|
BLAKE2b-256 | dbe054b31252c5d4fd42c8522e4a8d843b68cfef299385eb7ecf23a8a4400fe6 |