From aca699f2cbcf8690ce0244ad2110e651e6077e88 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Sat, 7 Jan 2017 18:54:03 +0100 Subject: [PATCH] Added documentation on localization --- docs/getting-started.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/getting-started.md b/docs/getting-started.md index 7b66abaea..aad71ce53 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -273,6 +273,27 @@ google_analytics: - 'auto' ``` +### Localization L10N + +In order to localize the labels (e.g. "Previous" and "Next" in the footer), +you can override the file `partials/i18n.html` to provide your own translations +inside the macro `t`: + +``` jinja +{% macro t(key) %}{{ { + "edit.link.title": "Edit this page", + "footer.previous": "Previous", + "footer.next": "Next", + "search.placeholder": "Search", + "source.link.title": "Go to repository", + "toc.title": "Table of contents" +}[key] }}{% endmacro %} +``` + +Just copy the file from the original theme and make your adjustments. See the +section on [overriding partials](customization.md/#overriding-partials) in the +customization guide. + ### More advanced customization If you want to change the general appearance of the Material theme, see