Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lindesvard committed Oct 4, 2023
1 parent 2815959 commit af71518
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/pages/docs/app-plurals.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ To declare plural translations, append `#` followed by `zero`, `one`, `two`, `fe
```ts {3-4}
// locales/en.ts
export default {
'cows#zero': 'No cows',
'cows#one': 'A cow',
'cows#other': '{count} cows'
} as const
Expand All @@ -27,6 +28,8 @@ export default function Page() {

return (
<div>
{/* Output: No cows */}
<p>{t('cows', { count: 0 })}</p>
{/* Output: A cow */}
<p>{t('cows', { count: 1 })}</p>
{/* Output: 3 cows */}
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/docs/pages-plurals.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ To declare plural translations, append `#` followed by `zero`, `one`, `two`, `fe
```ts {3-4}
// locales/en.ts
export default {
'cows#zero': 'No cows',
'cows#one': 'A cow',
'cows#other': '{count} cows'
} as const
Expand All @@ -27,6 +28,8 @@ export default function Page() {

return (
<div>
{/* Output: No cows */}
<p>{t('cows', { count: 0 })}</p>
{/* Output: A cow */}
<p>{t('cows', { count: 1 })}</p>
{/* Output: 3 cows */}
Expand Down

0 comments on commit af71518

Please sign in to comment.