Jump to:

10994 Posts in 2728 Topics by 1819 members

All other Modules

SilverStripe Forums » All other Modules » Default_locale with Sitetree Importer

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 863 Views
  • lerni
    Community Member
    80 Posts

    Default_locale with Sitetree Importer Link to this post

    hi all

    i'm trying to import via Sitetree Importer on a page with translatables enabled. Unfortunately the pages are always created in english and not in the default language.

    In _config.php i've set:
    Object::add_extension('SiteTree', 'Translatable');
    i18n::$common_locales['de_CH'] = array('Deutsch', 'Deutsch (Schweiz)');

    Any tips how I manage to get them in the default Language?

  • Kalileo
    Community Member
    127 Posts

    Re: Default_locale with Sitetree Importer Link to this post

    This might be too late for you, lerni, but may be it helps anyone else.

    IIRC the Sitetree Importer sets the Title field only (and the parent id). Have a look in it's PHP source code, that part is easy. There, right where it sets the title field, set also the locale field. See the sitetree table(s) for it's exact name. (I write this out of memory only, forgive me for not adding more details)

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.