From 1375f3d44aa3579a5d7eebbc0f64ab24c8935195 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Fri, 17 Jul 2020 00:15:59 +0200 Subject: [PATCH] Added guide for language configuration --- docs/guides/changing-the-language.md | 143 +++++++++++++++++++++++++++ 1 file changed, 143 insertions(+) diff --git a/docs/guides/changing-the-language.md b/docs/guides/changing-the-language.md index e69de29bb..01c95ee16 100644 --- a/docs/guides/changing-the-language.md +++ b/docs/guides/changing-the-language.md @@ -0,0 +1,143 @@ +--- +template: overrides/main.html +--- + +# Changing the language + +Material for MkDocs supports internationalization (i18n) and provides +translation keys for all template variables and labels in 40+ languages. +Additionally, search can be configured to use a language-specific stemmer +(if available). + +## Configuration + +### Site language + +[:octicons-file-code-24: Source][1] · :octicons-tools-24: Default: `en` + +You can set the language from `mkdocs.yml` with: + +``` yaml +theme: + language: en +``` + +The following languages are supported: + + + + + [1]: https://github.com/squidfunk/mkdocs-material/blob/master/src/partials/language/en.html + +### Directionality + +[:octicons-file-code-24: Source][2] · :octicons-tools-24: Default: best match +for `theme.language`, automatically set + +While many languages are read `ltr` (left-to-right), Material for MkDocs also +supports `rtl` (right-to-left) directionality which is inferred from the +selected language, but can also be set with: + +``` yaml +theme: + direction: ltr +``` + +:material-cursor-default-click-outline: click on a tile to change the +directionality: + + + + + + + + + [2]: https://github.com/squidfunk/mkdocs-material/blob/master/src/base.html#L180 + +### Search + +TBD