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.

All other Modules /

Discuss all other Modules here.

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

SS3.0.3 + Transalatable + check if lang


Go to End


697 Views

Avatar
wilsonStaff

Community Member, 143 Posts

22 January 2013 at 4:47pm

HI to all, ive succeeded implementing Translatbale over a SS3.0.3 installation. Works fine:
- i can create langauges
- i can create translations to these languages
- i can switch language back and forth.

QUESTION => How can i detect which language is displayed from templates? As if it was (know thats NOT it but you get the idea):

<% if lang = EN %>
My stuff in english
<% else %>
My stuff in other language
<% end_if %>

I see <% control Translations %> in my switch language code, is that the key?

OR is it by using _t ?

Thanks!