-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Update
next-intl
to support latest release candidate (`getTra…
…nslations` & `t.markup`)
- Loading branch information
Showing
7 changed files
with
50 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
examples/by-frameworks/next-intl/src/app/[locale]/GetTranslationsTest1.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { getTranslations } from 'next-intl/server' | ||
|
||
export default async function GetTranslationsTest1() { | ||
const t = await getTranslations() | ||
return <p>{t('IndexPage.title')}</p> | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/by-frameworks/next-intl/src/app/[locale]/GetTranslationsTest2.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { getTranslations } from 'next-intl/server' | ||
|
||
export default async function GetTranslationsTest2() { | ||
const t = await getTranslations('IndexPage') | ||
return <p>{t('title')}</p> | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/by-frameworks/next-intl/src/app/[locale]/UseTranslationsTest1.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { useTranslations } from 'next-intl' | ||
|
||
export default function UseTranslationsTest1() { | ||
const t = useTranslations('Test') | ||
return <p>{t('title')}</p> | ||
} |
6 changes: 6 additions & 0 deletions
6
examples/by-frameworks/next-intl/src/app/[locale]/UseTranslationsTest2.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { useTranslations } from 'next-intl' | ||
|
||
export default function UseTranslationsTest2() { | ||
const t = useTranslations() | ||
return <p>{t('Test.title')}</p> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters