Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

(solved) translatable and header images


Go to End


4 Posts   1245 Views

Avatar
Webdoc

Community Member, 349 Posts

8 July 2010 at 10:53am

Edited: 08/07/2010 12:17pm

Is there some code i can use for header images that if site is in english i use english header and when some other some other header image??

Avatar
Webdoc

Community Member, 349 Posts

8 July 2010 at 12:17pm

<% if Locale=en_US %>
<img src="themes/blackcandy/images/headen.png" width="800" height="100" border="0"/>
<% else %>
<img src="themes/blackcandy/images/head.png" width="800" height="100" border="0"/>
<% end_if %>

worked like charm in page.ss

Avatar
BigMoose

Community Member, 19 Posts

11 November 2011 at 6:34am

This was huge help for me today. Thank you for posting this solution.

Avatar
swaiba

Forum Moderator, 1899 Posts

11 November 2011 at 8:32am

I'd go one step further...

<img src="themes/blackcandy/images/head_{$Locale}.png" width="800" height="100" border="0"/> 

then with other locales no code change is needed.