From 4620dcc7595358c1b604eeeb33e74e250d6c56f8 Mon Sep 17 00:00:00 2001
From: Lee Robinson Welcome to my homepage!` element, evolved for the modern web.
+
+The Automatic Image Optimization allows for resizing, optimizing, and serving images in modern formats like [WebP](https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Image_types) when the browser supports it. This avoids shipping large images to devices with a smaller viewport. It also allows Next.js to automatically adopt future image formats and serve them to browsers that support those formats.
+
+### Migrating from Gatsby Image
+
+Instead of optimizing images at build time, Next.js optimizes images on-demand, as users request them. Unlike static site generators and static-only solutions, your build times aren't increased, whether shipping 10 images or 10 million images.
+
+This means you can remove common Gatsby plugins like:
+
+- `gatsby-image`
+- `gatsby-transformer-sharp`
+- `gatsby-plugin-sharp`
+
+Instead, use the built-in [`next/image`](/docs/api-reference/next/image.md) component and [Automatic Image Optimization](/docs/basic-features/image-optimization.md).
+
+```jsx
+import Image from 'next/image'
+
+export default function Home() {
+ return (
+ <>
+
My Homepage
+
{t('home:change-english')}
{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..439b5880f2dea 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" } From b87b2d46eacccc09cc81e37e7904427d4fcc990b Mon Sep 17 00:00:00 2001 From: Eric Burel