strapi / nextjs-corporate-starter

Strapi Demo application for Corporate Websites using Next.js
MIT License
959 stars 285 forks source link

Issue #15: Display localized content in Navbar and Footer #61

Closed AnasGamal closed 11 months ago

AnasGamal commented 1 year ago

Issue #15: Navbar and Footer components in Next.js are not displaying localized content fetched from the Strapi CMS. The default locale content is being shown instead of the expected localized content.

Fix: Refactored the RootLayout component to support localization. The getGlobal function now accepts the lang parameter and fetches the appropriate data based on the selected language. The generateMetadata function receives the params object as a parameter, allowing it to retrieve the metadata for the specified language. These changes ensure that the Navbar and Footer components display the correct localized content.

PaulBratslavsky commented 11 months ago

@AnasGamal thank you for your help. You are the best.