Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it work with next.js next-i18next? #66

Open
dgtllion opened this issue Sep 18, 2022 · 0 comments
Open

Does it work with next.js next-i18next? #66

dgtllion opened this issue Sep 18, 2022 · 0 comments
Labels
help wanted Extra attention is needed question Further information is requested

Comments

@dgtllion
Copy link

dgtllion commented Sep 18, 2022

When i try to install your package i get error from next-i18next package.
Error: locale is not set with serverSideTranslations.

Can you tell me how to make it work with nextjs next-i18next?

This is my implementation of serverSideTranslations.

import { serverSideTranslations } from 'next-i18next/serverSideTranslations';

export async function getStaticProps({ locale }) {
  return {
    props: {
      ...(await serverSideTranslations(locale, ['common', 'footer'])),
      // Will be passed to the page component as props
    },
  };
}
@helsonxiao helsonxiao added help wanted Extra attention is needed question Further information is requested labels Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants