With page router can be done using Head component, as per documentation:
https://nextjs.org/learn-pages-router/seo/crawling-and-indexing/metatags
But now seems not possible, and I can´t find nothing in the documentation.
I also found this, but was not able to test, where a StackOverflow user pointed out how the meta tag should contain “value” instead of “content
<meta name=”google” content=”notranslate”> not working anymore
It should be good to know also how to handle such situation with the actual metadata constant.
I tried to add for example:
export async function generateMetadata({ params: { lng } }) {
// Use the language-specific metadata, with a fallback to English if the language key is not found
const metadata = siteMetadata[lng] || siteMetadata.en;
return {
google: “notranslate”,
…
with no luck
Antonio Colella is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.