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.

Installing SilverStripe

Getting SilverStripe up and running on your computer and on your web server.

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

About Multi Language installation


Reply

13 Posts   4425 Views

Avatar
profimus

26 August 2010 at 6:25am Community Member, 8 Posts

Thanks, it works perfect!
Could it be possible to change language words into a flag pictures?

Avatar
yurigoul

26 August 2010 at 10:23am (Last edited: 26 August 2010 10:24am), Community Member, 202 Posts

One option is <img src ="$Locale.png" /> Or better yet is a php function that gives the right path

Or you use the class="$Locale" in your css file (with li.de-DE a for instance) to change the background of the href for link and hover

Avatar
profimus

28 August 2010 at 1:03am Community Member, 8 Posts

I've used a space in the code:

<img src ="themes/mytheme/images/$Locale .png" alt="$Title" />

And flag picture names are respectively "en_GB .png" & "lt_LT .png" - now works perfect.
Not sure why did'n work without a space - checked final html code and observed that $Locale argument wasn't grabbed...

Avatar
elsbth

26 January 2011 at 10:21pm Community Member, 8 Posts

Try putting curly brackets around your variable or else .png is read as a property or method for $Locale.

<img src ="themes/mytheme/images/{$Locale}.png" alt="$Title" />

Avatar
Isaac Salt

15 June 2012 at 10:31am Community Member, 3 Posts

Cheers yurigoul, your _config.php code worked for me, fixing this DB build error:

Unknown column 'SiteTree.Locale' in 'where clause'