jupyter-book icon indicating copy to clipboard operation
jupyter-book copied to clipboard

Changing language does not work every element in the page

Open vincmazet opened this issue 2 years ago • 2 comments

Describe the bug

My book is written in French. So I configure _config.yml by adding:

sphinx:
  extra_extensions:
  config:
    language: fr

The tag <html lang="fr"> appears in the source code and the search page is in French, but some elements are still in English:

  • "Search this book..." in the search box"
  • "Contents" in the right column
  • "Fullscreen mode" in the button.

This is annoying...

Reproduce the bug

Write a book and build it, after having specifying the language in _config.yml.

List your environment

Jupyter Book : 0.13.0 External ToC : 0.2.4 MyST-Parser : 0.15.2 MyST-NB : 0.13.2 Sphinx Book Theme : 0.3.2 Jupyter-Cache : 0.4.3 NbClient : 0.5.3

Ubuntu 22.04

vincmazet avatar Jul 15 '22 13:07 vincmazet

Same Problem here. Is there any way to fix this? I did set:

sphinx:
  extra_extensions:
  config:
    language: de

Perhaps we need to set also the locale to de in sphinx?

iasbusi avatar Aug 24 '22 14:08 iasbusi

Same problem here, with language: es. This was not an issue as recently as May 2022 (though I probably installed jupyterbook months earlier).

It looks like there's a workaround (https://github.com/executablebooks/sphinx-book-theme/issues/584#issuecomment-1180040436) that's a bit involved, but I haven't tried it. It'd be great to have this bug fixed.

emiliom avatar Nov 02 '22 03:11 emiliom