https://github.com/s3rius/mkdoc-translations
Multiple languages support for mkdocs
https://github.com/s3rius/mkdoc-translations
Last synced: 11 months ago
JSON representation
Multiple languages support for mkdocs
- Host: GitHub
- URL: https://github.com/s3rius/mkdoc-translations
- Owner: s3rius
- Created: 2021-03-12T22:26:17.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-03-12T22:37:00.000Z (over 5 years ago)
- Last Synced: 2025-07-18T08:37:02.610Z (11 months ago)
- Language: Python
- Size: 29.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mkdocs translations plugin
This plugin is inspired by [mkdocs-static-i18n](https://github.com/ultrabug/mkdocs-static-i18n) plugin,
but it solves problem with tabs. With it, you can use nested documentation file structure.
Also, it's integrated with mkdocs-material theme features.
Such as [search](https://squidfunk.github.io/mkdocs-material/setup/setting-up-site-search/),
[language switcher](https://squidfunk.github.io/mkdocs-material/setup/changing-the-language/),
and [tabs](https://squidfunk.github.io/mkdocs-material/setup/setting-up-navigation/#navigation-tabs).
For example, with the following configuration:
```yaml
# Add this plugin in your mkdocs.yml
plugins:
- translations:
default_language: ru
languages:
en: english
ru: русский
```
It will turn this.
```
docs
├── Dir1
│ ├── index.md
│ ├── index.en.md
│ ├── Theme1.md
│ ├── Theme1.en.md
│ ├── Theme2.md
│ └── Theme2.en.md
├── index.en.md
├── index.md
└── Dir2
├── index.md
├── index.en.md
├── Theme1.md
└── Theme1.en.md
```
Into this:
```
site
├── 404.html
├── index.html
├── Dir1
│ ├── Theme1
│ │ └── index.html
│ ├── index.html
│ └── Theme2
│ └── index.html
├── Dir2
│ ├── Theme1
│ │ └── index.html
│ └── index.html
├── en
│ ├── Dir1
│ │ ├── Theme1
│ │ │ └── index.html
│ │ ├── index.html
│ │ └── Theme2
│ │ └── index.html
│ ├── index.html
│ └── Dir2
│ ├── Theme1
│ │ └── index.html
│ └── index.html
└── ru
├── Dir1
│ ├── Theme1
│ │ └── index.html
│ ├── index.html
│ └── Theme2
│ └── index.html
├── index.html
└── Dir2
├── Theme1
│ └── index.html
└── index.html
```