This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by Pieter 10 years ago.

Author Posts
September 20, 2009 at 6:23 pm #12335

Pieter

I want to add an image for the h2 page title. Obviously this image has to change depending on the language, so I thought I place all images in a sprite.
What would be the easiest way to get the correct image to show, depending on the language chosen?

September 20, 2009 at 8:38 pm #12337

hifa

see the following link
http://wpml.org/forums/topic.php?id=164#post-754.
Mihai gives code snipptet for it.
you just will use

<?php if(ICL_LANGUAGE_CODE=='en'): ?>

and call corresponding css in your h2 class.
do the same for other language.

September 22, 2009 at 7:00 pm #12338

Pieter

cool, thanks @hifa, I will check it out

The topic ‘[Closed] how to use sprite based on language’ is closed to new replies.