Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » (solved) translatable and header images

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

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

Page: 1
Go to End
Author Topic: 920 Views
  • Webdoc
    Avatar
    Community Member
    332 Posts

    (solved) translatable and header images Link to this post

    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??

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: (solved) translatable and header images Link to this post

    <% 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

  • BigMoose
    Avatar
    Community Member
    19 Posts

    Re: (solved) translatable and header images Link to this post

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

  • swaiba
    Avatar
    Forum Moderator
    1792 Posts

    Re: (solved) translatable and header images Link to this post

    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.

    920 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.