The suggestion doesn’t make sense. You can’t specify meta
-keywords
in an HTTP header. (Only meta
elements with an http-equiv
instead of a name
attribute can alternatively be specified with HTTP headers.)
It’s also not true that you would need CGI for sending an HTTP header. This could be achieved directly within your server configuration, too (for example, mod_headers for Apache).
And there’s nothing "shady" about CGI at all; many sites use PHP, Python etc. to generate/process documents and set HTTP headers.
So, that said:
If you want to use meta
-keywords
(ignoring the discussion about its usefulness here), simply use it.
If you want to specify the keywords in different languages on the same document, simply add several meta
-keywords
elements with the lang
attribute:
<!-- on the English page, e.g., with 'lang="en"' on the 'html' element -->
<meta name="keywords" content="…"> <!-- using the default language as specified on 'html' or 'head' -->
<meta name="keywords" lang="de" content="…"> <!-- German keywords -->
<meta name="keywords" lang="fr" content="…"> <!-- French keywords -->
But if you have translated documents, you’d typically only include meta
-keywords
in the respective language.
Linking to translations, as you know, can be achieved by using the link
element with the alternate
link type and the hreflang
attribute:
<link href="/de/" rel="alternate" hreflang="de">
Example
So for a site in English and German, you might want to include this on the English page:
<!-- lang="en" -->
<meta name="keywords" content="…"> <!-- English keywords -->
<link href="/de/" rel="alternate" hreflang="de">
and this on the German page:
<!-- lang="de" -->
<meta name="keywords" content="…"> <!-- German keywords -->
<link href="/en/" rel="alternate" hreflang="en">
cn
is not a valid value. – unor Dec 16 '14 at 13:26