From 7b634ad79c0c039965be9392262271ae9c695731 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Thu, 28 Nov 2019 10:34:46 +0100 Subject: [PATCH] Improve and document how to set language direction, i.e ltr/rtl. --- README.md | 7 +++++++ layouts/_default/baseof.html | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7850110..855d3af 100644 --- a/README.md +++ b/README.md @@ -276,6 +276,8 @@ A language selector will be included on sites with more than one language. Add ` The language selector will link to a translation of the current page if it exist and to the front page if it does not. +For "rtl" languages add a `dir` parameter to the language configuration. If not added it will default to "ltr". + ``` languages: sv: @@ -284,6 +286,11 @@ languages: en: weight: 2 languageName: "English" + ar: + weight: 3 + languageName: "العربية" + params: + dir: "rtl" ``` diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 2c823d8..e609244 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -1,5 +1,5 @@ - +