Content according to the language

pch
@pch
12 years ago
328 posts
Hello,

Can someone show me how to properly show a content acconding to a language?

E.g:

if lang = es-ES, show...Text 1
if lang = fr-FR, show...Text 2
etc

I would like to show a specif template logo image according to the language. I have some text on the logo image that should be change a according to the language.

I would like to do the same with the Facebook Fan box. I have 3 Facebook page. Same post/news but in different languages.

Thanks
updated by @pch: 12/26/13 08:40:59PM
brian
@brian
12 years ago
10,149 posts
You would do something like this:

{if $_user.user_language == 'es-ES'}
    ... show your image for es-ES ...
{elseif $_user.user_language == 'fr-FR'}
    ... show your image for fr-FR ...
{else}
    ... show the default image ...
{/if}

Hope this helps!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
12 years ago
328 posts
Awesome Brian. Thanks a lot. The same applies for Facebook fan pages and any text placed directly into the template, right?
brian
@brian
12 years ago
10,149 posts
Yep..


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
pch
@pch
12 years ago
328 posts
Great! Thanks.

Tags