Skip to content

Conversation

BlueGlassBlock
Copy link
Contributor

Last year I opened mkdocstrings/python#77 to add initial i18n infrastructure, yet I forgot to propose changes on mkdocstrings side & add documentation until I recently picked up Python again.

This PR, combined with mkdocstrings/python#TODO should make internationalization fully prepared and exposed.

@pawamoy
Copy link
Member

pawamoy commented Jun 30, 2025

Sorry for the very long wait @BlueGlassBlock 🙇

I've updated the PR to use locale instead of language, because I felt like language could be confusing since it could be seen as something related to programming languages rather than natural ones.

I also changed the logic so that the computed locale is passed to the handlers' render (and render_backlinks) methods. This way handlers who want to support I18N can simply receive this parameter in their methods, and pass it to their own templates (and own translation logic).

Copy link
Member

@pawamoy pawamoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK LGTM now! Next update in the Python handler will allow using this new locale parameter 😄

@pawamoy pawamoy merged commit 2b4ed54 into mkdocstrings:main Jul 10, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants