Open alaincroisetiere opened 6 years ago
@alaincroisetiere great suggestion and sorry for the long reply! Let's try to address it after 2.0 release! Would you mind helping with this? I can ping you once I'm done with 2.0!
Hello, I had confused the previous issue. How do I change the Redoc language? Even if it is manually.
@danielsalles It's not supported by ReDoc yet.
Even if it is manually
You can fork the repo and change all the texts in source files manually and then build the bundle but I would not recommend this approach and wait until official support for localization!
@RomanGotsiy I would like to help with the translations. You can ping me once the 2.0 release is ready :smiley:
@bandantonio thanks! Will definitely ping once it's done!
I think we need to clarify, is the goal of these API providers:
It seems single non-English language support can be solved by ReDoc translating text (eg Response, Required, etc...).
It seems that multi-language support for a single spec definition needs to somehow be also solved inside the definition.
Hello! Any news with the translation? It is very useful feature. Maybe I can help with the translation?
In our case we have a single non-english language (need to provide documentation in Dutch)
Are there any plans for this, any started PRs or ideas on how to proceed?
Are there any plans for this,
yes, this is planned but no concrete estimates yet
any started PRs or ideas on how to proceed?
Not any I am aware of.
or ideas on how to proceed?
I would write some more lightweight analog of https://github.com/yahoo/react-intl.
react-intl
has features that are not-essential for redoc (number formatting, pluralize and other).
Do we have any news about this?
I would like to help for Turkish language
help for chinese
Update:
Recently I added labels
config option to ReDoc which can be used to implement translations. But it covers very few labels for now.
Help with finishing this would be appreciated!
For reference, this was introduced in https://github.com/Rebilly/ReDoc/commit/b0e660e
@RomanGotsiy I will try to send some PRs for this next month when I pickup our ReDoc project again to migrate to the latest :)
any updates?
Hello. It will be a wonderful feature. However, it seems to be easy, because it is necessary to change messages and is provided by OpenAPI file him-self
Good to hear it have been taken into consideration now... Really appreciate this as a Chinese developer.
BTW, I once worked for a game localization organization. And I think the best way to make ReDoc multi-language is use some automatic tool (I once discover this kind of tool accidentally, but have forgotten) to extract string from the source code, transform these string into some translation-specific representation, then use some volunteer-crowdsourcing translation platform like Serge, Transifex (the organization I worked for use Weblate, but I think it's not nice enough) to translate them.
This kind of pipeline has helped thousands of open-source project to be multi-language, including Semantic UI.
Any news on this?
huge bump on this +1000 this is extremely needed
Let's add this to the roadmap after we release v2. See #1292 . I should probably make a separate tracking issue for the longer-term.
Any news for this ?
Is there any news?
Any updates ?
+1
Hey, I'd like to know any news on this topic 👍
As of v2.0.0, there is a new internal service loading some of the labels.
The service is configured by the usage of a labels
option from the Redoc.init
method.
const labels = {
enum: 'Enum',
enumSingleValue: 'Value',
enumArray: 'Items',
default: 'Default',
deprecated: 'Deprecated',
example: 'Example',
examples: 'Examples',
recursive: 'Recursive',
arrayOf: 'Array of ',
webhook: 'Event',
const: 'Value',
noResultsFound: 'No results found',
download: 'Download',
downloadSpecification: 'Download OpenAPI specification',
responses: 'Responses',
callbackResponses: 'Callback responses',
requestSamples: 'Request samples',
responseSamples: 'Response samples',
};
Redoc.init(specUrl, {labels}, redocElement);
The labels are taken from the label service file. https://github.com/Redocly/redoc/blob/5fb4daa618bb6911ff566530001f1320d818134e/src/services/Labels.ts#L3-L22
Note that I'm using the standalone version and am not a contributor of the project in anyway.
Has there been any updates on this? I am very sure many people would like to have the documentation in multiple languages with the ability to switch between them.
As of v2.0.0, there is a new internal service loading some of the labels.
Where is this documented? I don't see a labels
option here: https://redocly.com/docs/redoc/config/
Would it be possible to add the ability to change the display language of ReDoc UI?