Skip to content

Commit 368c8a3

Browse files
committed
ENH: Create infrastructure for translations
* Reorganizes file structure for multilanguage support * Adds a language switcher to the top of the page * Adds language option to web pages command line builder
1 parent d4045f0 commit 368c8a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2936
-47
lines changed

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,3 +141,10 @@ doc/source/savefig/
141141
# Pyodide/WASM related files #
142142
##############################
143143
/.pyodide-xbuildenv-*
144+
145+
# Web #
146+
#######
147+
web/pandas/content/en/pdeps
148+
web/pandas/content/en/static
149+
web/pandas/content/pt/pdeps
150+
web/pandas/content/pt/static

web/pandas/_templates/layout.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html>
2-
<html>
2+
<html lang="{{ selected_language }}">
33
<head>
44
<script defer data-domain="pandas.pydata.org" src="https://views.scientific-python.org/js/script.js"></script>
55
<title>pandas - Python Data Analysis Library</title>
@@ -15,6 +15,8 @@
1515
href="{{ base_url }}{{ stylesheet }}">
1616
{% endfor %}
1717
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css">
18+
<meta id="languages" data-lang="{{ languages }}">
19+
<script src="{{ base_url }}static/js/language_switcher.js"></script>
1820
</head>
1921
<body>
2022
<header>
@@ -50,6 +52,8 @@
5052
</li>
5153
{% endif %}
5254
{% endfor %}
55+
<!-- Language switcher -->
56+
<div id="language-switcher-container"></div>
5357
</ul>
5458
</div>
5559
</div>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)