Skip to content
This repository was archived by the owner on Jun 14, 2024. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,40 @@ menu:
url: /
weight: 1
- name: Documentation
url: /docs/
url: /en/docs/
weight: 2


# Internationalization

defaultContentLanguage: en

# show language abbreviation in url. If you enable this option, remember to update image paths
# defaultContentLanguageInSubdir: true
languages:
ar:
contentDir: content/ar
languageName: عربى
languagedirection: rtl
title: مدونتي
weight: 2
en:
contentDir: content/en
languageName: English
title: My project
weight: 1
esp:
contentDir: content/spa
languageName: Español
title: Mi proyecto
weight: 2
fr:
contentDir: content/fr
languageName: Français
title: Mon projet
weight: 2
pt-pt:
contentDir: content/pt
languageName: Português
title: O meu blog
weight: 3
10 changes: 10 additions & 0 deletions content/ar/blah.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Introduction"
description: "Arabic blah.md"
toc: true
weight: 1
---

## Arabic languge docs

Add your Arabic language docs in this directory.
File renamed without changes.
File renamed without changes.
10 changes: 10 additions & 0 deletions content/fr/blah.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Introduction"
description: "French blah.md"
toc: true
weight: 1
---

## French languge docs

Add your French language docs in this directory.
10 changes: 10 additions & 0 deletions content/pt/blah.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Introduction"
description: "Portuguese blah.md"
toc: true
weight: 1
---

## Portuguese languge docs

Add your Portuguese language docs in this directory.
10 changes: 10 additions & 0 deletions content/spa/blah.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: "Introduction"
description: "Spanish blah.md"
toc: true
weight: 1
---

## Spanish languge docs

Add your Spanish language docs in this directory.
2 changes: 2 additions & 0 deletions i18n/en-US.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
home:
other: Home
2 changes: 2 additions & 0 deletions layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
<body>
{{ partial "navbar.html" . }}
<main class="content">
{{ partial "i18nlist.html" }}
{{ partial "allLanguages.html" }}
{{ block "main" . }}
{{ end }}
</main>
Expand Down
5 changes: 5 additions & 0 deletions layouts/partials/allLanguages.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<ul>
{{ range $.Site.Home.AllTranslations }}
<li><a href="{{ .Permalink }}">{{ .Language.LanguageName }}</a></li>
{{ end }}
</ul>
10 changes: 10 additions & 0 deletions layouts/partials/i18nlist.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{ if .IsTranslated }}
<h4>{{ i18n "translations" }}</h4>
<ul>
{{ range .Translations }}
<li>
<a href="{{ .Permalink }}">{{ .Lang }}: {{ .Title }}{{ if .IsPage }} ({{ i18n "wordCount" . }}){{ end }}</a>
</li>
{{ end }}
</ul>
{{ end }}