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.

General Questions /

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

v2.3.2 multi language switcher on template problem


Reply


841 Views

Avatar
kudesign

Community Member, 64 Posts

2 August 2009 at 6:50pm

Edited: 02/08/2009 6:51pm

I got multi language to work in v2.3.2, and now trying to set up the 'available language' code in my template:

<% if Translations %>
<ul class="translations">
<% control Translations %>
<li class="$Locale.RFC1766">
<a href="$Link" hreflang="$Locale.RFC1766"
title="$Title">
<% sprintf(_t('SHOWINPAGE','Show page in %s'),$Locale.Nice)%>
</a>
</li>
<% end_control %>
</ul>
<% end_if %>

After applying this code into my template, I could not get it to read properly, this is what I see on my live pages:

<% sprintf(_t('SHOWINPAGE','Show page in %s'),)%>

How do I change this to say 'See this page in English' or 'See the page in <the language available>'

This is what my page look like now: http://www.nisglass.co.nz/glass/home-3/

Hope someone can help me out here, cheers!!