Jump to:

5540 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Custom tranlation little problem

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

Page: 1
Go to End
Author Topic: 435 Views
  • tdmarko
    Community Member
    4 Posts

    Custom tranlation little problem Link to this post

    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.

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.