Skip to content

i18n support #319

Open
Open
@karjona

Description

@karjona

Hello everyone,
Currently, the plugin doesn't seem to generate much internationalization data when running docusaurus write-translations. Only a single i18n label appears to be generated, at least in my environment:

{
  "version.label": {
    "message": "Next",
    "description": "The label for version current"
  }
}

This makes it very difficult to translate API documentation generated by this plugin into different languages.

Is your feature request related to a problem?

  • No

Describe the solution you'd like

Ideally, when generating translation data using docusaurus write-translations, the plugin would create i18n labels for every string that can be reasonably translated, as other plugins (including the built-in ones) already do. That would mean generating labels for, for example:

  • Headers and table data in the intro doc
  • Collapsible header titles in the endpoint docs ("Request", "Authorization")
  • Buttons and other interactive elements ("Send API Request", "Example")
  • Labels ("required")

The site owners could then localize these elements to the different languages they need for their site.

Describe alternatives you've considered

I've considered hiding the language select dropdown while browsing the API documentation or generating a new, separate docusaurus instance that only contains the API documentation, isolated from the rest of the more general docs that we currently provide in different languages. This can certainly be done, but it takes extra work to host and manage and makes our global documentation solution... less inclusive, for lack of a better word.

Additional context

Screenshot 2022-11-02 at 17 36 58

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed and we are accepting pull requests from anyone willing to take this on.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions