diff --git a/examples/with-next-translate/_pages/index.js b/examples/with-next-translate/_pages/index.js index d523b5e3500cc..95e5bc831cb2e 100644 --- a/examples/with-next-translate/_pages/index.js +++ b/examples/with-next-translate/_pages/index.js @@ -1,4 +1,4 @@ -import Link from 'next-translate/Link' +import Link from 'next/link' import Trans from 'next-translate/Trans' import useTranslation from 'next-translate/useTranslation' import Layout from '../components/Layout' @@ -22,14 +22,14 @@ export default function Home() {

- +

{t('home:english')}

{t('home:change-english')}

- +

{t('home:catalan')}

{t('home:change-catalan')}

diff --git a/examples/with-next-translate/i18n.json b/examples/with-next-translate/i18n.json index ddcf1b31fd6e0..203c87de82968 100644 --- a/examples/with-next-translate/i18n.json +++ b/examples/with-next-translate/i18n.json @@ -1,6 +1,6 @@ { - "allLanguages": ["en", "ca"], - "defaultLanguage": "en", + "locales": ["en", "ca"], + "defaultLocale": "en", "currentPagesDir": "_pages", "finalPagesDir": "pages", "localesPath": "locales", diff --git a/examples/with-next-translate/next.config.js b/examples/with-next-translate/next.config.js new file mode 100644 index 0000000000000..35cc22eb4f6ca --- /dev/null +++ b/examples/with-next-translate/next.config.js @@ -0,0 +1,8 @@ +const { locales, defaultLocale } = require('./i18n.json') + +module.exports = { + i18n: { + locales, + defaultLocale, + }, +} diff --git a/examples/with-next-translate/package.json b/examples/with-next-translate/package.json index 93cc8bafb8d04..0ffb02a5f2fce 100644 --- a/examples/with-next-translate/package.json +++ b/examples/with-next-translate/package.json @@ -6,10 +6,10 @@ "start": "next start" }, "dependencies": { - "next": "9.4.4", - "next-translate": "0.16.1", - "react": "16.13.1", - "react-dom": "16.13.1" + "next": "10.0.0", + "next-translate": "0.19.0", + "react": "17.0.1", + "react-dom": "17.0.1" }, "license": "MIT" -} +} \ No newline at end of file