-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
i18n #109
Comments
Another way to do multi-lang would be to adjust the language used by drf-spectacular for parts of the tree according to the language of |
doing i18n on the explicit string (like above) through the django facilites would we rather easy. schema serving endpoints should honor the language header by default. the cli command could receive the language via an extra parameter. however, translating the docstring documentation would be the real problem. solving that in a clean way looks messy/complicated. |
And drf-spectacular can monkey patch the |
(Can of worms opener ...)
All messages emitted by
drf-spectacular
should be from message catalogs, and the appropriate language used based on the HTTP request headers using standard Django i18n mechanisms including fallbacks (to English usually).e.g.
I guess the only way to have l10n is to embed all available languages in the mandatory
description
's using html blocksc.f. OAI/OpenAPI-Specification#274 , api-platform/api-platform#1363 , OAI/OpenAPI-Specification#1740 (comment) .
But this is Django, and Django REST Framework, and so should follow its conventions where possible ;-).
The text was updated successfully, but these errors were encountered: