File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,13 @@ const _is_file_uri = (uri) => uri.startsWith("file:/");
66const _IS_LOCAL = _is_file_uri ( window . location . href ) ;
77const _CURRENT_RELEASE = DOCUMENTATION_OPTIONS . VERSION || "" ;
88const _CURRENT_VERSION = _CURRENT_RELEASE . split ( "." , 2 ) . join ( "." ) ;
9- const _CURRENT_LANGUAGE = DOCUMENTATION_OPTIONS . LANGUAGE ?. toLowerCase ( ) || "en" ;
9+ const _CURRENT_LANGUAGE = ( ( ) => {
10+ const _LANGUAGE = DOCUMENTATION_OPTIONS . LANGUAGE ?. toLowerCase ( ) || "en" ;
11+ // Python 2.7 and 3.5--3.10 use ``LANGUAGE: 'None'`` for English
12+ // in ``documentation_options.js``.
13+ if ( _LANGUAGE === "none" ) return "en" ;
14+ return _LANGUAGE ;
15+ } ) ( ) ;
1016const _CURRENT_PREFIX = ( ( ) => {
1117 if ( _IS_LOCAL ) return null ;
1218 // Sphinx 7.2+ defines the content root data attribute in the HTML element.
You can’t perform that action at this time.
0 commit comments