Allow to access to a language directly though instance.tld/:lang

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2021-11-07 21:02:36 +01:00
parent 7c4a76cc89
commit 5de0cee025
5 changed files with 46 additions and 7 deletions

View File

@@ -50,8 +50,8 @@ defmodule Mobilizon.Web.Views.Utils do
index_content
|> replace_meta(tags)
|> String.replace(
"<html lang=\"en\" dir=\"auto\">",
"<html lang=\"#{locale}\" dir=\"#{get_language_direction(locale)}\">"
~s(<html lang="en" dir="auto">),
~s(<html lang="#{locale}" dir="#{get_language_direction(locale)}">)
)
end