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 :: prependchild javascript 
Javascript :: cordova delete cache 
Javascript :: Uncaught (in promise) cancel 
Javascript :: send variable to javascript promise 
Javascript :: show and hide div based on radio button click react 
Javascript :: js store regex in variable and combine 
Javascript :: react timer 
Javascript :: react html parser 
Javascript :: on reload js 
Javascript :: discord js v12 get user tag with id 
Javascript :: next js custom document 
Javascript :: upi id regex 
Javascript :: Navigator operation requested with a context that does not include a Navigator. 
Javascript :: js date to timestamp 
Javascript :: yarn add node-sass webpacker error rails 
Javascript :: Adding a Method to a JavaScript Object 
Javascript :: fontawesome icon size 1.5 angular 
Javascript :: how to cancel request using axios cancel token 
Javascript :: Minimal Project Angular 
Javascript :: reactjs cdn file 
Javascript :: how to apply border to table in angular 
Javascript :: storybook react router 
Javascript :: disabled text color tailwind 
Javascript :: how to get a due date from current date in javascript 
Javascript :: useref in functional component 
Javascript :: node.js check if a remote URL exists 
Javascript :: fizz buzz program in javascript 
Javascript :: leaflet tile service 
Javascript :: swap numbers in javascript 
Javascript :: vuejs set default value for prop 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =