I'm building a multilingual site in Drupal 7 and I'm struggling to figure out how to translate meta tags on the front page. The tags I need to translate are title, description and keywords. I have set up the meta tags quick module and it works fine for nodes but my front page is not a node but a collection of blocks so this approach can't be used.
I know there are meta tags quick front page settings in the structure in the admin panel but these only allow you to set up the default (in my case, English) version of the front page's description and keywords. there is no option to translate them. For the title tag, I found an option in configuration -> page titles but again, this only allows you to set the English version (or 1 default version, anyway) so you end up with a handful of duplciate titles. As a result, currently all my front pages (8 languages in total) have the same title, description and keywords tags). Any help would be much appreciated. Thanks in advance!
Comments
You can not translate meta
You can not translate meta tags.
isn't this kind of a
isn't this kind of a critically missing feature?
Have you found any solution
Have you found any solution for this problem? 1 year later I am still having the same problem
Work-around to translation of frontpage metadata
I'm trying to achieve it through "context metatags", included in metatag. Obviously, it depends on context module.
You can make a context for each language, with two conditions, path= and language="whatever-lang-you-want".
The magic is that "context metatags" provides a reaction called "meta data", that allows you overwrite any meta data rule when the context applies.
Don't forget to set the "Require all conditions" checkbox on.
Good luck.
You can use variable, token and a custom module
Hello,
I had the same problem and found a solution using http://drupal.org/project/variable, http://drupal.org/project/token and a custom module.
mymodule.variable.inc
mymodule.module
Admin settings
Hope it helps.
Thanks damouille
Thanks @damouille , your code works fine for me...keep it up
Awesome!!!
Awesome!!! It worked for me also. Thanks for the code.
Entity translation
You can do this using the Internationalization module (i18n). The module comes with a bunch of small submodules, including String Translation (string_i18n).
If you enable that module you will see an option to translate your metatags if you go to
admin/config/search/metatags
Hope this helps.