diff --git a/storefront/next.config.ts b/storefront/next.config.ts index 20873fcc..043ea209 100644 --- a/storefront/next.config.ts +++ b/storefront/next.config.ts @@ -1,7 +1,30 @@ import type {NextConfig} from "next"; const nextConfig: NextConfig = { - /* config options here */ + i18n: { + locales: [ + 'en-gb', + 'ar-ar', + 'cs-cz', + 'da-dk', + 'de-de', + 'en-us', + 'es-es', + 'fr-fr', + 'hi-in', + 'it-it', + 'ja-jp', + 'kk-kz', + 'nl-nl', + 'pl-pl', + 'pt-br', + 'ro-ro', + 'ru-ru', + 'zh-hans' + ], + defaultLocale: 'en-gb', + }, }; + export default nextConfig; diff --git a/storefront/src/pages/index.tsx b/storefront/src/pages/index.tsx index c09a0d42..5168466e 100644 --- a/storefront/src/pages/index.tsx +++ b/storefront/src/pages/index.tsx @@ -1,6 +1,7 @@ import {apolloClient} from 'graphql/apolloClient'; import {GET_PRODUCTS} from 'graphql/queries/getProducts'; import {GetStaticProps} from 'next'; +import {useRouter} from "next/router"; export const getStaticProps: GetStaticProps = async () => { const {data} = await apolloClient.query({