Maybe its stupid question, but is it possible to translate meta tags to different languages?

For example, I have keywords like:

[node:title], pasta, bread

is ist possible to translate keywords like pasta and bread somehow?

Comments

adelka’s picture

If anybody looks for solution, I found out this solution:

  1. I have installed custom tokens module http://drupal.org/project/token_custom.
  2. I have created new tokens - www.yoursite.com/admin/structure/token-custom - I've used php snippet to translate words
  3. I've used custom token in page title configuration page

I used this php snippet for each word I needed to be multilingual:

  global $language;
  $lang_name = $language->language;
  if ( $lang_name == "en" ) print "page"; 
  if ( $lang_name == "sk" ) print "str."; 
  

Of couse, its not very flexible (if you have many languages or you plan to add more later) but its solution for now.

There is small bug - Parse error, but you can find patch here: http://drupal.org/node/1660340

Ejstrup’s picture

Unfortunately this doesn't seem to work when cache is turned on (at least not for me).

DamienMcKenna’s picture

Status: Active » Closed (duplicate)