Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions website/docs/docusaurus-core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,12 @@ You can even omit the children prop and specify a translation string in your `co

:::

:::info

Your custom uses of `<Translate />` are also capable of handling [string pluralization](./i18n/i18n-tutorial.mdx#pluralization)
Copy link
Collaborator

@slorber slorber Jan 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Your custom uses of `<Translate />` are also capable of handling [string pluralization](./i18n/i18n-tutorial.mdx#pluralization)
The `<Translate>` component supports [interpolation](#interpolate) and [pluralization](./i18n/i18n-tutorial.mdx#pluralization).

edit: nop, bad suggestion

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, do we really support pluralization when using <Translate>? Afaik we don't.

Also we probably need to apply selectMessage() before translating the content 😅 otherwise we translate string parts that we don't even use.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you


:::

## Hooks {#hooks}

### `useDocusaurusContext` {#useDocusaurusContext}
Expand Down