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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

i18n not setting html lang in next.config.js #278

Closed
nslee333 opened this issue Mar 15, 2024 · 2 comments
Closed

i18n not setting html lang in next.config.js #278

nslee333 opened this issue Mar 15, 2024 · 2 comments

Comments

@nslee333
Copy link

Love your starter by the way, thanks for setting it up. 馃槂

Currently having an issue with i18n not setting the html lang element, not sure if it is an issue with the starter or if I'm missing something.

next.config.js

const nextConfig = {
  eslint: {
    dirs: ['src'],
  },
  reactStrictMode: true,
  swcMinify: true,

  i18n: {
    locales: ['en-US'],
    defaultLocale: 'en-US',
  },

...
@theodorusclarence
Copy link
Owner

Hi, I never used built-in i18n before. However in this starter we declare html here. So you might need to do some custom config to get the current lang

https://github.com/theodorusclarence/ts-nextjs-tailwind-starter/blob/main/src/app/layout.tsx

@nslee333
Copy link
Author

I was trying to use i18n since I thought that it was the only option to set the html lang attribute, which now I know better - I just set it manually so that works. Thanks for the help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants