godot-docs
godot-docs copied to clipboard
Set preferred language.
Is it possible to set a preferred language for the docs? You can change the language in the "Read the Docs" menu. But the language is also in the URL. That means whenever you go through a search engine or a link someone sent you, you have to set your language again.
Personally, I prefer to develop in English. However, I don't want to change the language settings of the search engine or browser. I watch movies and play games in my language, but development is English only. From code to docs and communication on forum, GitHub, etc. So it would be great if the Godot docs page would remember my language even if I load a link with a different language code.
We could use the localStorage to store the selected language. We could give a "remember" checkbox option. This setting has the highest priority. Over URL language code etc. Not sure how to do that? Redirect? May annoy. What engine / framework do Godot docs use? Maybe there is a build-in feature for that?
What engine / framework do Godot docs use? Maybe there is a build-in feature for that?
The Godot documentation uses Sphinx (hosted on Read the Docs). In my experience, it doesn't tend to have much (if anything) for internationalization, so custom development is required to actually set a preferred language.
Some JavaScript code could be run on page load to redirect you if you have a preferred language set somewhere. This would also require adding a dropdown somewhere to set a language as the preferred language.
@twoco I had the same issue and while it's not solved yet I'm using a chrome plugin called Redirector to automatically rewrite Godot docs urls into english. 🙂
I documented the process here: https://idkshite.com/posts/read-godot-english