aboutsummaryrefslogtreecommitdiffstats
path: root/fatcat_scholar
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2021-03-23 21:38:16 -0700
committerBryan Newbold <bnewbold@archive.org>2021-03-23 21:38:16 -0700
commite70e7cff4b5c910405694fb297330507b49937b1 (patch)
treedb6db14cc662dd347a2807769d3af739d50f9f03 /fatcat_scholar
parent558156b879a06cc8ab0f2872ba9306d3ae75c1cc (diff)
downloadfatcat-scholar-e70e7cff4b5c910405694fb297330507b49937b1.tar.gz
fatcat-scholar-e70e7cff4b5c910405694fb297330507b49937b1.zip
implement additional translation languages
Diffstat (limited to 'fatcat_scholar')
-rw-r--r--fatcat_scholar/templates/base.html4
-rw-r--r--fatcat_scholar/web.py15
2 files changed, 18 insertions, 1 deletions
diff --git a/fatcat_scholar/templates/base.html b/fatcat_scholar/templates/base.html
index 584f950..5af6ea2 100644
--- a/fatcat_scholar/templates/base.html
+++ b/fatcat_scholar/templates/base.html
@@ -89,9 +89,13 @@
<a role="menuitem" class="item" href="/ar/">عَرَبِيّ</a>
<a role="menuitem" class="item" href="/de/">Deutsch</a>
<a role="menuitem" class="item" href="/es/">Español</a>
+ <a role="menuitem" class="item" href="/fa/">فارسی</a>
<a role="menuitem" class="item" href="/fr/">Français</a>
<a role="menuitem" class="item" href="/hr/">Hrvatski</a>
+ <a role="menuitem" class="item" href="/it/">Italiano</a>
<a role="menuitem" class="item" href="/nb/">Norwegian Bokmål</a>
+ <a role="menuitem" class="item" href="/nl/">Nederlands</a>
+ <a role="menuitem" class="item" href="/pt/">Português</a>
<a role="menuitem" class="item" href="/ru/">Русский</a>
<a role="menuitem" class="item" href="/zh/">中文</a>
<div class="divider"></div>
diff --git a/fatcat_scholar/web.py b/fatcat_scholar/web.py
index 2193746..5020bf1 100644
--- a/fatcat_scholar/web.py
+++ b/fatcat_scholar/web.py
@@ -27,7 +27,20 @@ from fatcat_scholar.schema import ScholarDoc
logger = logging.getLogger()
-I18N_LANG_TRANSLATIONS = ["de", "zh", "ru", "ar", "fr", "es", "nb", "hr"]
+I18N_LANG_TRANSLATIONS = [
+ "ar",
+ "de",
+ "es",
+ "fa",
+ "fr",
+ "hr",
+ "it",
+ "nb",
+ "nl",
+ "pt",
+ "ru",
+ "zh",
+]
I18N_LANG_OPTIONS = I18N_LANG_TRANSLATIONS + [
settings.I18N_LANG_DEFAULT,
]