Question

I'm developing a web application which manages i18n on the client (I'm using i18next).

What I'm wondering is, how to handle <meta> tags when loading the initial language or switching languages (through user interaction).

Say I have something like this:

<meta name="description" content="This is a page about foo!">

The content specified here is not really visible to the user, so in theory there would be no need to translate it. Still I'm thinking about identifying the requester/user language and displaying the default website in the specific website.

Question:
Should <meta> tags be translated? For example, if Facebook was requesting my OpenGraph meta when parsing my page, should these be served in default language or should I try to identify the requester language, generate the page on the client in this language (all dynamic so no problem)?

Thanks for some insights.

Was it helpful?

Solution

To the extent that <meta name=... content=...> tags have any impact, the content should be in the main language of the page in order to have a positive effect and not confusion.

Most of such tags are write-only (they have no impact on anything), though they may be inspected by users, not only by viewing HTML source but also using normal browser commands, like Tools → Page info in Firefox. Not very common, but to avoid awkward impact, either remove the tags or make sure that their content is in the right language.

The <meta name=description content=...> tag is known to have some impact on some search engines (though much less than many people claim or think), so it should definitely be translated if it is used.

The language used should be the (main) language of the page, of course. Whether and how the language of the page is selected according to “requester language” (whatever that means) is a separate question.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top