SEO for multilingual Drupal sites
SEO is important for most Drupal sites. It also needs to be multilingual.
Nodewords also allows you to add custom meta data to your pages. For example you can add custom meta data to all you blog entries without having to add it to every page. Translating this data is a little more tricky.
The Nodewords module implements hook_preprocess_page() to add its meta data to a page. In this process it uses the drupal_alter function to allow the variables to be altered. This looks like a perfect spot to insert any translations.
How do we enter the translations?
The t() function can be used to translate interface strings. Any strings passed to the t function will be added to the locale tables and the translations can be entered via the Translate interface, /admin/build/translate. This looks ideal for us. The problem is, this is not what the t() function is designed for. It's meant to be used to translate fixed strings from php code. eg t("Read mode...")
You can read more about the use and miss-use of t() in Gábor Hojts' article.
The other option is to use the i18nstrings functions. This is designed to be used for this sort of purpose. The problem here is that we need a unique identifier that we can use to save the string. In this case we don't have that, we only have the string text itself.
We're looking for creative ideas on how we can use i18nstrings, drupal_alter and Nodewords together.
What do you think?