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

Template printing template code SS 2.4


Reply


3 Posts   299 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, 94 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 :)