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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

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


1170 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!!