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

Add Messages in ALL pages using next 12 #951

Closed
Pitp0t opened this issue Mar 21, 2024 · 1 comment
Closed

Add Messages in ALL pages using next 12 #951

Pitp0t opened this issue Mar 21, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation unconfirmed Needs triage.

Comments

@Pitp0t
Copy link

Pitp0t commented Mar 21, 2024

Link to page

https://next-intl-docs.vercel.app/docs/faq

Describe the problem

**In _app ** Next

MyApp.getInitialProps = async (appContext) => { const appProps = await App.getInitialProps(appContext); const locale = appContext.router.locale || appContext.router.defaultLocale || "es"; const messages = (await import(messages/${locale}.json`)).default;

return {
...appProps,
pageProps: {
...appProps.pageProps,
messages: messages,
},
};
};
`

@Pitp0t Pitp0t added documentation Improvements or additions to documentation unconfirmed Needs triage. labels Mar 21, 2024
@amannn
Copy link
Owner

amannn commented Mar 21, 2024

Sorry, there's barely any information available here, I'm not sure what you're intending to do. If you have a usage question, then please submit a new question on Stack Overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation unconfirmed Needs triage.
Projects
None yet
Development

No branches or pull requests

2 participants