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

Support for i18n #284

Open
lightmagic1 opened this issue Apr 1, 2023 · 6 comments
Open

Support for i18n #284

lightmagic1 opened this issue Apr 1, 2023 · 6 comments
Assignees
Labels
enhancement New feature or request investigating

Comments

@lightmagic1
Copy link

Can i somehow make my API specification available in multi-language setup?

@rohit-gohri rohit-gohri added the enhancement New feature or request label Apr 17, 2023
@rohit-gohri
Copy link
Owner

I'm not sure how that would look like, do you have any examples on what the feature would look like for a user?

I think we could add support for i18n that could work like how it does for blogs where you would have 1 OpenAPI file for each language, WDYT? That would leave managing of the translations upto the developer of the site.

@Logerfo
Copy link

Logerfo commented Aug 9, 2023

A cool feature would be to have text attributes as i18n objects. For example, instead of:

description: This is a nice description

We could have:

description:
  en: This is a nice description
  pt-BR: Essa é uma descrição legal

But I understand that requires more work to achieve.

I would be happy with the possibility to have multiple YAML files, like:

docs/
|-openapi.yaml
|-openapi-pt-BR.yaml

And make the plugin generate the correct i18n file structure for docusaurus:

website
|-docs/
  |-openapi.html
|-i18n/
  |-pt-BR/
    |-docusaurus-plugin-content-docs/
      |-current/
        |-openapi.html

@Nostromos
Copy link

@Logerfo check out jsdoc-to-mdx! They have an interesting way of dealing with i18n that you may be able to crib from for use with redocusaurus.

@bryanjtc
Copy link

bryanjtc commented Mar 7, 2024

Any alternative available while redocusaurus works on adding i18n support?

@rohit-gohri
Copy link
Owner

rohit-gohri commented Mar 7, 2024

@bryanjtc None I'm aware about. But thanks for reviving this (also @Nostromos ).

I started looking into it, and docusaurus has pretty extensive translation workflows that I'd like to plug into - https://docusaurus.io/docs/api/plugin-methods/i18n-lifecycles rather than having it manage as multiple yaml files

It would help a lot if someone can share any public docusaurus projects that use i18n, especially for anything other than markdown, so that I can use them as reference.

@rohit-gohri rohit-gohri self-assigned this Mar 7, 2024
@rohit-gohri
Copy link
Owner

I think this is the current best work-around - #317 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request investigating
Projects
Status: No status
Development

No branches or pull requests

5 participants