Skip to content

Commit 219d877

Browse files
tobiasHeinkeBlendify
authored andcommitted
Add language to the JS output variable (#400)
Makes the current language accessible as a JS variable. Would be nice to have for the version & language switch I'm writing (to avoid the workaround of extracting it from the url).
1 parent 6023e62 commit 219d877

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sphinx_rtd_theme/layout.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@
181181
var DOCUMENTATION_OPTIONS = {
182182
URL_ROOT:'{{ url_root }}',
183183
VERSION:'{{ release|e }}',
184+
LANGUAGE:'{{ language }}',
184185
COLLAPSE_INDEX:false,
185186
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
186187
HAS_SOURCE: {{ has_source|lower }},

0 commit comments

Comments
 (0)