Translations system (with fr translations)

This commit is contained in:
southerntofu 2020-03-29 19:54:15 +02:00
parent 244ac9b93b
commit d7e45dc856
5 changed files with 42 additions and 2 deletions

View File

@ -11,6 +11,10 @@ highlight_code = false
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false
languages = [
{code = "fr", rss = true}
]
[extra]
# Put all your custom variables here
title = "dnsmanager - liberate your zones"

View File

@ -0,0 +1,16 @@
+++
+++
[Accueil](@/_index.fr.md)
---
[Blog](DUMMIE)
---
[Source](https://github.com/kaneroot/dnsmanager)
---
[FAQ](@/faq/index.fr.md)

7
content/_index.fr.md Normal file
View File

@ -0,0 +1,7 @@
+++
title = "Accueil"
+++
# dnsmanager
dnsmanager est un logiciel convivial

11
content/faq/index.fr.md Normal file
View File

@ -0,0 +1,11 @@
+++
title = "FAQ"
+++
# Comment installer dnsmanager?
Le [README](https://github.com/KaneRoot/dnsmanager) contient les instructions pour installer dnsmanager.
# dnsmanager supporte-t-il la délégation?
Pour le moment, dnsmanager ne sait pas déléguer une zone. Cette fonctionnalité sera probablement implémentée dans le futur.

View File

@ -1,5 +1,5 @@
{% import "widgets.html" as widgets %}
{% if section %}{% set lang = section.lang %}{% elif page %}{% set lang = page.lang %}{% else %}{% set lang = false %}{% endif %}
{% set lang = section.lang | default(value=page.lang) %}{% if lang == "en" %}{% set lang = false %}{% endif %}
<!DOCTYPE html>
<html class="no-js" lang="{{ lang | default(value="en")}}">
<head>
@ -14,7 +14,9 @@
<header>
{% set header = get_page(path="_common/header.md") %}
{{ header.content | markdown | safe }}
{{ widgets::menu(content="_common/menu.md") }}
{% if lang %}{{ widgets::menu(content="_common/menu." ~ lang ~ ".md") }}
{% else %}{{ widgets::menu(content="_common/menu.md") }}
{% endif %}
</header>
<main>
{% block main %}