Skip to content
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

Add the ability to change the display language #367

Open
alaincroisetiere opened this issue Oct 31, 2017 · 28 comments
Open

Add the ability to change the display language #367

alaincroisetiere opened this issue Oct 31, 2017 · 28 comments

Comments

@alaincroisetiere
Copy link

Would it be possible to add the ability to change the display language of ReDoc UI?

@RomanHotsiy
Copy link
Member

@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!

@danielsalles
Copy link

Hello, I had confused the previous issue.
How do I change the Redoc language? Even if it is manually.

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Nov 10, 2017

@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!

@bandantonio
Copy link

@RomanGotsiy I would like to help with the translations. You can ping me once the 2.0 release is ready 😃

@RomanHotsiy
Copy link
Member

@bandantonio thanks! Will definitely ping once it's done!

@adamaltman
Copy link
Member

I think we need to clarify, is the goal of these API providers:

  1. Single non-English language support.
  2. Multiple language support.

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.

@winlx
Copy link

winlx commented Jan 30, 2018

Hello! Any news with the translation? It is very useful feature. Maybe I can help with the translation?

@CumpsD
Copy link
Contributor

CumpsD commented Jul 25, 2018

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?

@RomanHotsiy
Copy link
Member

RomanHotsiy commented Jul 26, 2018

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).

@ArthNRick
Copy link

Do we have any news about this?

@suadev
Copy link

suadev commented Sep 19, 2018

I would like to help for Turkish language

@JoveYu
Copy link

JoveYu commented May 14, 2019

help for chinese

@RomanHotsiy
Copy link
Member

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!

@CumpsD
Copy link
Contributor

CumpsD commented May 14, 2019

For reference, this was introduced in 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 :)

@Nerzal
Copy link

Nerzal commented Jul 16, 2019

any updates?

@gigaga
Copy link

gigaga commented Nov 7, 2019

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

@Ray-Eldath
Copy link

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.

@Dennis-Petrov
Copy link

Any news on this?

@handhikadj
Copy link

huge bump on this
+1000
this is extremely needed

@adamaltman
Copy link
Member

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.

@Shivansh-Mittal
Copy link

Any news for this ?

@bulychev
Copy link

Is there any news?

@C4st3ll4n
Copy link

Any updates ?

@xdkaka
Copy link

xdkaka commented Nov 15, 2022

+1

@tedmed
Copy link

tedmed commented Nov 22, 2022

Hey, I'd like to know any news on this topic 👍

@stefgodin
Copy link

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.

const labels: LabelsConfig = {
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',
};

Note that I'm using the standalone version and am not a contributor of the project in anyway.

@oskr27
Copy link

oskr27 commented Apr 12, 2023

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.

@lornajane lornajane removed the feature label Jul 28, 2023
@allanlewis
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests