Skip to content
Snippets Groups Projects
Commit 4983c588 authored by Brita Linnestad's avatar Brita Linnestad
Browse files

Add code for language spesific legends

parent f746391b
Branches
No related tags found
No related merge requests found
......@@ -113,6 +113,16 @@ def create_warning_status(start_date):
# Generate mapfile
# Building data sets for language specific legends
languages = []
language_codes = config["i18n"]["languages"].split(",");
for language_code in language_codes:
language = {"language_code": language_code}
if ("i18n.%s" % language_code) in config:
for keyword in config["i18n.%s" % language_code]:
language[keyword] = config["i18n.%s" % language_code][keyword]
languages.append(language)
# The paths should be set in a .env file
env = Environment(loader=FileSystemLoader('.'))
template = env.get_template("mapfile/template.j2")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment