How to set lang attribute on html element with Nuxt? How to set lang attribute on html element with Nuxt? vue.js vue.js

How to set lang attribute on html element with Nuxt?


Source: Declaring language in HTML tag · Issue #388 · nuxt/nuxt.js

head supports a htmlAttrs property. It will map each key:value of the object as attribute:value

module.exports = {  head: {    htmlAttrs: {      lang: 'en'    },    title: 'awesome title',    meta: [      { charset: 'utf-8' },      { name: 'viewport', content: 'width=device-width, initial-scale=1' },      { hid: 'description', name: 'description', content: 'Nuxt.js project' }    ],    link: [      { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }    ]  },  ...}