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

Template printing template code SS 2.4


Go to End


3 Posts   622 Views

Avatar
dylangrech92

Community Member, 17 Posts

25 October 2013 at 1:50am

This: <% _t( 'Appeak.Name', 'Name' ) %>
Prints: <% _t( 'Appeak.Name', 'Name' ) %>

Any idea why this is happening?

I have this template in root/themes/themeName/templates/AppeakPokerWidget.ss,
code in: root/appeakpoker
lang files in: root/appeakpoker/lang

Yes I have these in the lang file:
global $lang;
$lang[ 'en_US' ][ 'Appeak' ][ 'Name' ] = 'Name';

Avatar
Bereusei

Community Member, 96 Posts

25 October 2013 at 4:35am

Edited: 25/10/2013 4:36am

I think, whitespace is missing, before and after %, isn't it?
<% _t('Appeak.Name','Name') %>

Avatar
dylangrech92

Community Member, 17 Posts

25 October 2013 at 7:05pm

Thanks man, it never crossed my mind that, that would have been the problem thanks :)