Jump to:

23377 Posts in 18296 Topics by 2867 members

General Questions

SilverStripe Forums » General Questions » Multilanguage / Batch Action Problem

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: 525 Views
  • Silver2010
    Avatar
    Community Member
    5 Posts

    Multilanguage / Batch Action Problem Link to this post

    Dear Members,

    I'd like to ask you for my following problems with Version 2.4.2. I need for my new project multilanguage. I read many topics for this problem. But I don't think I have the right solution for that.

    I need to languages german and english us. I copied this code in my _config.php:

    // add multilanguage Support
    i18n::set_locale('de_DE');
    Object::add_extension('SiteTree', 'Translatable');
    Object::add_extension('SiteConfig', 'Translatable'); // 2.4 or newer only
    Translatable::set_default_locale('de_DE');

    In my Page.php I wrote:
       
    public function init() {
          parent::init();
           if($this->dataRecord->hasExtension('Translatable')){
    i18n::set_locale($this->dataRecord->Locale);
    }
    The main problem is that I don't understand what is the correct code for my version 2.4.2.

    A bIg problem is: I have the menu with languages in the backend but if do /dev/build with the database. I get in my english us profile a new category. I don't understand that? I tryed to delete that not necessary categories with batch action - I can't delete them only in the german profile?

    Is there any tip for that problem or a better solution with multilanguage???

    Thanks for the help!

          

    Attached Files
    525 Views
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.