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.

Customising the CMS /

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

Custom tranlation little problem


Go to End


887 Views

Avatar
tdmarko

Community Member, 4 Posts

4 March 2011 at 11:57pm

Edited: 05/03/2011 12:05am

Hello SS community!

Having a little problem tranlating custom text placed in Page.ss.

So I have my page in three languages, and I want to make custom placed text change depenting on page language.

I have added in sapphire/lang/ru_RU, en_US, lv_LV following lines:

$lang['ru_RU']['Page.ss']['subtitle'] = 'i'm ru text.';

$lang['en_US']['Page.ss']['subtitle'] = ''i'm en text.';

$lang['lv_LV']['Page.ss']['subtitle'] = ''i'm lv text.';

Then in Page.ss I've added <% _t("subtitle","subtitle") %>, but unfortunetly when I change languages the text is displayed in english all the time. Other thing translation like navigation, $Title works fine.

What I'm doing wrong? Thank you!

---------------------------------------------------------- Added later ---------------------------------------------------

Removed the en_US, changed <% _t("subtitle","subtitle") %> to <% _t("subtitle","i'm en text.") %>, still nothing.