Jump to:

23454 Posts in 18904 Topics by 2877 members

General Questions

SilverStripe Forums » General Questions » Adding translatable fields

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

Page: 1
Go to End
Author Topic: 761 Views
  • MrHyde
    Community Member
    23 Posts

    Adding translatable fields Link to this post

    Hi, i'm working on my HomePage pagetyp and wondering how to make the datafields i added translateable. I'm new to silverstripe and took a look to the tutorials, but i feel that i dont really get the sense of it.

    This is my code so far (HomePage.php):

    class HomePage extends Page {

    static $db = array(
    'Name1' => 'Varchar(20)'

    static $has_one = array(
    static $icon = "mysite/images/treeicons/home";

    function getCMSFields() {
    $fields = parent::getCMSFields();

    $fields->addFieldToTab('Root.Content.Main', new TextField('Name1'), 'Content');

    return $fields;

    Can anybody help?

  • MrHyde
    Community Member
    23 Posts

    Re: Adding translatable fields Link to this post

    I shortened the code i posted above. Its basicly just about making Name1 translateable.
    I took some further look to this forum and found out that this problems appears to be a well known and beeing discussed here:

    Cause this Topic is a bit older I'm wondering if there is any solution which came along SS v2.2.3. Need your help please...

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.