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, Ed, biapar, Willr, Ingo, swaiba

v2.3.2 multi language switcher on template problem

Go to End



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" 
    <% sprintf(_t('SHOWINPAGE','Show page in %s'),$Locale.Nice)%>
<% end_control %>
<% 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:

Hope someone can help me out here, cheers!!