Jump to:

10848 Posts in 2516 Topics by 1792 members

All other Modules

SilverStripe Forums » All other Modules » Translatable installation and files upload problem on 3.0.5

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 603 Views
  • dannybo
    Avatar
    Community Member
    4 Posts

    Translatable installation and files upload problem on 3.0.5 Link to this post

    Hallo guys!
    So how to install translatable on 3.0.5?
    I know similar questions have been asked on this forum as well as other places in internet dozens of times. And I checked them all. None works correctly.

    eg. Method on github causes server error during the first database rebuild.

    This code from ssbits.com works at first:

    Translatable::set_default_locale('en_GB');
    Translatable::set_allowed_locales(array(
    'en_GB', //UK English
    'ro_RO', //Romanian
    'ru_RU' //Russian
    )
    );
    Object::add_extension('SiteTree', 'Translatable');

    Translations after implementing it worked perfect, but uploading new files became impossible and causes "SyntaxError: Unexpected token T". Actually the whole section "Files" became useless.

    So what is the correct way to install Translatable and not to break anything else???

    I use SilverStripe 3.0.5 on Ubuntu LAMP. Translatable 1.0.0.

    Thanx in advance for any tips.

  • UncleCheese
    Avatar
    4085 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    The best way to install any module is with Composer. If you're having issues, you need to be much more clear about what the problem is. "It causes an error" is not enough information to help you.

  • dannybo
    Avatar
    Community Member
    4 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    thanx for answer UncleCheese!
    Anyway I tried silverstripe 2.4.10 and found it much better. CMS is much faster, no annoying bugs etc. Meanwhile waiting for 3.1.0

  • gaspra
    Avatar
    Community Member
    8 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    Have you tried to run the backend in English? I did have some problems there too and this helped. I'm not sure if this is the same issue but it is worth a try.

    Additionally I would not develop anything new on a SilverStripe < 3 despite the issues (speed, bugs). Version 3 was released while I was developing my first SilverStripe page and there was some work to do porting to the new version. Not exceptionally much but still...

  • dannybo
    Avatar
    Community Member
    4 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    Thanx for answer gaspra!
    My backend is in English, so it's something else..

  • gaspra
    Avatar
    Community Member
    8 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    Well then then let's start over.

    I have SilverStripe 3.0.5 running with Translatable 1.0 - installed without Composer (not set up yet) and it works as long as I have the backend in English. When I switch the backend to German I get the same error you're reporting when I upload/move etc.. files in the backends "Files" Section.

    Let's compare the site config. Here is what I have set up:

    // Set the site locale
    i18n::set_locale('de_DE');

    // Translation
    Translatable::set_default_locale("de_DE");

    $allowed_locales = array(
    'de_DE' => array('German', 'Deutsch'),
    'en_US' => array('English', 'Englisch'),
    );
    i18n::$common_locales = $allowed_locales;

    Good luck

  • dannybo
    Avatar
    Community Member
    4 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    Hi gaspra!
    Here is my piece of code from config:

    i18n::set_locale('uk_UA');
    Translatable::set_default_locale("uk_UA");

    Translatable::set_default_locale('uk_UA');
    Translatable::set_allowed_locales(array(
    'uk_UA'
    'en_GB',
    'ru_RU'
    )
    );
    Object::add_extension('SiteTree', 'Translatable');

    In backend Security section I switched to English interface, but the problem was still there.

    Anyway I was very limited in time, so I've allready done the project in Silverstripe 2.4.10 where I didn't find any bugs at all and which is much faster. So the problem allready expired. Just hoping 3.1.0 will be more stable.
    Cheers!

  • gaspra
    Avatar
    Community Member
    8 Posts

    Re: Translatable installation and files upload problem on 3.0.5 Link to this post

    Try to remove the last line

    Object::add_extension('SiteTree', 'Translatable');

    I think I remember removing it when upgrading to v3 following the upgrade guide. I definitely don't have it in my config and it does work.

    Of course there is still a lot of room for improvements in 3.1

    603 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.