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

Localization of labels, titles. #591

Closed
nacho4d opened this issue Aug 18, 2015 · 5 comments
Closed

Localization of labels, titles. #591

nacho4d opened this issue Aug 18, 2015 · 5 comments

Comments

@nacho4d
Copy link

nacho4d commented Aug 18, 2015

Swagger looks really nice!. It would be even better if I the server can show me localised labels in an specific language (provided a query parameter in the url or by reading the Accepted-Languages request header, etc)

I know API documentation/specifications for big projects are usually written in english but if swagger is used for some local/internal projects then probably the local language will be used (Japanese in my case).

Currently I can write the documentation in Japanese but the titles, labels, etc are still in english. Wouldn't it be nice to have a localised string for those? I don't expect labels in the yaml file to be changed. Just the result document/html. So basically current document:

screen shot 2015-08-18 at 17 08 27

would become:

localized

(By labels I meant words like Summary->概要, Description→説明, Parameters→パラメーター, Responses→リスポンス, Code→コード, Default→デフォルト, etc...)

@nacho4d nacho4d changed the title Localization Localization of labels, titles. Aug 18, 2015
@webron
Copy link
Contributor

webron commented Aug 18, 2015

Thanks, but this has nothing to do with swagger-editor. It's a feature request to swagger-spec which exists here - OAI/OpenAPI-Specification#274. Feel free to add your comments there.

@nacho4d
Copy link
Author

nacho4d commented Aug 18, 2015

I see... Thanks for the link. I will write something there

@mohsen1
Copy link
Contributor

mohsen1 commented Aug 18, 2015

Localization of labels in Swagger Editor is something we can do, although it's a very low priority. We should use something like angular translate to achieve it. Instead of using a query parameter we can use standard Accept-Language header. We can have a query parameter that overrides Accept-Language. That would be nice.

Providing translation in spec description and summary is something that might come in next Swagger spec (OAI/OpenAPI-Specification#274). When it landed in spec, editor should also show correct language entry for description.

@mohsen1 mohsen1 reopened this Aug 18, 2015
@mohsen1 mohsen1 added this to the Backlog milestone Aug 18, 2015
@nacho4d
Copy link
Author

nacho4d commented Aug 18, 2015

We can have a query parameter that overrides Accept-Language.

👍

@webron
Copy link
Contributor

webron commented Jun 8, 2017

Closing as an old issue. Please file a new one if still relevant.

@webron webron closed this as completed Jun 8, 2017
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

3 participants