RTL languages support
nakibrayan3 opened this issue · comments
ريان نقيب commented
when i type text in Arabic (a RTL written language) it appear from the left to the right.
for this to work i need to add dir="rtl"
to the <html>
tag
<!DOCTYPE html>
<html dir="rtl" lang="ar">
<head>
<meta charset="utf-8">
...
edit: i learned how to fix it
- you need to edit
layouts/_default/baseof.html
old line:
<html lang="{{ .Lang }}" itemscope itemtype="http://schema.org/WebPage">
new line:
<html dir="{{ if (isset .Site.Params "dir") }}{{ .Site.Params.dir }}{{ else }}ltr{{ end }}" lang="{{ .Lang }}" itemscope itemtype="http://schema.org/WebPage">
- and then add
dir = "rtl"
under [languages.ar] in theconfig.toml
[languages.ar]
contentDir = "content/ar"
weight = 1
languageName = "Arabic"
[languages.ar.params]
introTitle = "some arabic text"
introSubtitle = "another arabic text"
introPhoto = "/picture.png"
dir = "rtl"
ريان نقيب commented
i have a pull request that fix this problem