Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to add lang attribute in next js

import { Html, Head, Main, NextScript } from 'next/document';

export default function Document() {
  return (
    <Html lang='en'>
      <Head />
      <body>
        <Main />
        <NextScript />
      </body>
    </Html>
  );
}
Comment

NextJS add lang attribute to HTML tag

//So to add this tag, we need to use the next.config.js file
module.exports = {
  i18n: {
    locales: ['en'],
    defaultLocale: 'en',
  },
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: sequelize date format 
Javascript :: js array map skip element 
Javascript :: speech to text in js 
Javascript :: JavaScript if, else, and else if 
Javascript :: label animation css 
Javascript :: sort array in ascending order javascript 
Javascript :: decode jwt tokens 
Javascript :: make forn awesome icon clickable in react 
Javascript :: methods of object js 
Javascript :: queryselector for jquery 
Javascript :: react router v6 
Javascript :: multilone input html 
Javascript :: how to redirect to another page without writing javascript 
Javascript :: onscroll load more in vue native 
Javascript :: javascript eventlistener 
Javascript :: react native geocoding 
Javascript :: list of string angular 
Javascript :: js how to filter range in place 
Javascript :: javaScript get() Method 
Javascript :: why to use arrow functions over normal function 
Javascript :: chatbot using html and javascript 
Javascript :: axios 400 bad request 
Javascript :: javascript strings are immutable 
Javascript :: find the largest array from an array in javascript 
Javascript :: format function shift the date one day up date-fns 
Javascript :: How to dispatch from another module vuex 
Javascript :: mongoose find 
Javascript :: superagent vs axios 
Javascript :: stringy 
Javascript :: history.pushstate 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =