Drupal 5.x - Multilingual images?

Events happening in the community are now at Drupal community events on www.drupal.org.
Duncan_S's picture

I've searched high and low for how to implement multilingual images in Drupal 5.x, but I don't think I'm looking in the right places and I've had no luck thus far.

So, how do you folks generally implement language specific images? Spread your knowledge, I implore.

Comments

Image and other HTML tags



Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.

I've actually already got

Duncan_S's picture

I've actually already got your Language Sections module installed on the site (great little tool it is, too, so thanks for that!), so I'll see what it can do in this regard.

Hope it helps

andy inman's picture

Cool. Well I haven't tried doing "multilingual images" but I remembered that post from somebody who was doing something like that and seemed to find that the LS module helped. The current dev version has a "default" section which may be useful... allows something like:

=== es ===
Spanish stuff.
=== qz ===
Stuff for all languages except Spanish.
=== qq ===
Stuff for ALL languages.



Currently part of the team at https://lastcallmedia.com in a senior Drupal specialist role.

I'm not sure what you mean

jax's picture

I'm not sure what you mean with "multilingual images" but if you want to store images and maintain a "translation" relationship between these images I would recommend http://drupal.org/project/image + http://drupal.org/project/i18n and then enable the multilingual attribute for the "Image" content type. That way you can create an image for each language and link them together as translations.

simpler method?

ronniead@drupal.org's picture

I have a theme which has embedded images. I would like those images to change based on the language which is chosen...anyone have any suggestions?

Ronnie

Say that you have a header

jax's picture

Say that you have a header image in English (header_en.png) and in Spanish (header_es.png). In your page.tpl.php you could do:

<?php
echo mytheme_header_image()
?>

And in your template.php you put
<?php
function mytheme_header_image() {
  global
$language;
  return
path_to_theme() . '/images/header_' . $language->language . '.png';
}
?>

Viola! That's the first option that comes to mind.

Internationalization

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: