1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-02 09:42:35 +00:00

Support l10n of config strings (#2045)

This commit is contained in:
2023-02-27 12:36:42 -06:00
parent 227609f768
commit f396afa15f
13 changed files with 106 additions and 18 deletions

View File

@ -0,0 +1,6 @@
{% import "partials/languages/" ~ config.theme.language ~ ".html" as lang %}
{% import "partials/languages/en.html" as fallback %}
{% import "overrides/strings." ~ config.theme.language ~ ".html" as customlang with context %}
{% import "overrides/strings.en.html" as customfallback %}
{% macro t(key) %}{{ lang.t(key) or fallback.t(key) or customlang.t(key) or customfallback.t(key) or key }}{% endmacro %}