Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mondeja/mkdocs-mdpo-plugin
Mkdocs translation plugin using PO files.
https://github.com/mondeja/mkdocs-mdpo-plugin
i18n internationalization markdown mdpo mkdocs plugin po python translation
Last synced: 3 months ago
JSON representation
Mkdocs translation plugin using PO files.
- Host: GitHub
- URL: https://github.com/mondeja/mkdocs-mdpo-plugin
- Owner: mondeja
- License: bsd-3-clause
- Created: 2021-04-26T14:53:13.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-10T11:29:51.000Z (8 months ago)
- Last Synced: 2024-09-30T08:41:57.243Z (4 months ago)
- Topics: i18n, internationalization, markdown, mdpo, mkdocs, plugin, po, python, translation
- Language: Python
- Homepage: https://mondeja.github.io/mkdocs-mdpo-plugin/
- Size: 894 KB
- Stars: 7
- Watchers: 2
- Forks: 5
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# mkdocs-mdpo-plugin
[![PyPI version](https://img.shields.io/pypi/v/mkdocs-mdpo-plugin?label=version)](https://pypi.org/project/mkdocs-mdpo-plugin)
[![Downloads](https://img.shields.io/pypi/dm/mkdocs-mdpo-plugin)](https://pypistats.org/packages/mkdocs-mdpo-plugin)
[![Test](https://img.shields.io/github/workflow/status/mondeja/mkdocs-mdpo-plugin/CI?label=tests&logo=github)](https://github.com/mondeja/mkdocs-mdpo-plugin/actions?query=workflow%3ACI)
[![Documentation](https://img.shields.io/github/workflow/status/mondeja/mkdocs-mdpo-plugin/Github%20Pages?label=docs&logo=github)](https://mkdocs-mdpo.ga)
[![Cloudflare DNS](https://img.shields.io/github/workflow/status/mondeja/mkdocs-mdpo-plugin/website-check?label=dns&logo=cloudflare&logoColor=white)](https://github.com/mondeja/mkdocs-mdpo-plugin/actions/workflows/website-check.yml)Translations for Mkdocs using PO files, fully customizable.
Compatible with [mkdocs-material](https://squidfunk.github.io/mkdocs-material),
based on [mdpo][mdpo-docs].## Documentation: [en](https://mkdocs-mdpo.ga) - [es](https://mkdocs-mdpo.ga/es/)
## Install
```
pip install mkdocs-mdpo-plugin
```## Usage
Enable the plugin in your `mkdocs.yml`:
```yaml
plugins:
- mdpo
```### Minimal configuration
#### With [mkdocs-material](https://squidfunk.github.io/mkdocs-material)
```yaml
theme:
name: material
language: enextra:
alternate:
- name: English
lang: en
- name: EspaΓ±ol
link: es
lang: esplugins:
- mdpo
```#### Standalone
```yaml
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](https://mkdocs-mdpo.ga).[mdpo-docs]: https://mondeja.github.io/mdpo/