Simple Machines Community Forum

Customizing SMF => Graphics and Templates => Aiheen aloitti: Sheda - heinäkuu 19, 2011, 04:46:03 IP

Otsikko: Change pictures depending on language?
Kirjoitti: Sheda - heinäkuu 19, 2011, 04:46:03 IP
Hey, another question.

I intend to replace most text-based buttons on my forum with pictures. It looks really good, but there's an issue: I'd like to keep English language in my forum (default language is another one), yet if you chose English as your language, you'd still get the same pictures for things like "quote", "profile" etc.
Is there a way to code that, if someone chose English they'd get different pictures than the default ones?
I'm pretty certain it can be done... after all text can be changed too. Just no idea how to pull it off.
Otsikko: Re: Change pictures depending on language?
Kirjoitti: Illori - heinäkuu 19, 2011, 04:51:39 IP
which version of smf are you running? what theme are you using?
Otsikko: Re: Change pictures depending on language?
Kirjoitti: Gary - heinäkuu 19, 2011, 05:12:24 IP
To call language specific images use:

<img src="' , $settings['lang_images_url'] , '/filename.png" alt="" />

Then, simply place them in Themes/[THEME]/images/[LANGUAGE]/

This is universal among all versions and all themes.
Otsikko: Re: Change pictures depending on language?
Kirjoitti: Sheda - heinäkuu 20, 2011, 05:31:34 AP
Thanks a lot! ;D