Starting to work on lang translations.

This commit is contained in:
Dessalines 2021-03-02 11:39:34 -05:00
parent 5c53e3b03c
commit 062a41da5c
3 changed files with 17 additions and 1 deletions

View file

@ -11,5 +11,18 @@ highlight_code = false
# Whether to build a search index to be used later on by a JavaScript library
build_search_index = false
default_language = 'en'
languages = [
{code = "fr"},
]
[translations]
[translations.en]
hello = "A title"
[translations.fr]
hello = "Un titre"
[extra]
# Put all your custom variables here

View file

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="{{ lang | default (value=config.default_language) }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

View file

@ -21,6 +21,9 @@
<div class="container">
<div class="text-center">
{{lang}}
{{ trans(key="hello", lang=lang) }}
<h2>Follow communities anywhere in the world</h2>
<p><a href="https://github.com/LemmyNet">Lemmy</a> is similar to sites like <a href="https://reddit.com">Reddit</a>, <a href="https://lobste.rs">Lobste.rs</a>, or <a href="https://news.ycombinator.com/">Hacker News</a>: you subscribe to communities you're interested in, post links and discussions, then vote and comment on them. Lemmy isn't just a reddit alternative; its a network of interconnected communities ran by different people and organizations, all combining to create <b>a single, personalized front page</b> of your favorite news, articles, and memes. </p>
<p><a class="button primary" href="/join">Join a Server</a></p>