Jump to:

23355 Posts in 17838 Topics by 2862 members

General Questions

SilverStripe Forums » General Questions » Problem with translations

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 2
Go to End
Author Topic: 1919 Views
  • Webdoc
    Avatar
    Community Member
    332 Posts

    Problem with translations Link to this post

    if i wanna translate the page
    it gives the adress like so: http://mysite.com/admin/show/63/admin/admin/show/71/?locale=en_US
    but it must be http://mysite.com/admin/show/71/?locale=en_US

    how to fix it

  • dalesaurus
    Avatar
    Community Member
    283 Posts

    Re: Problem with translations Link to this post

    This doesn't make much sense, can you elaborate on what you are doing, what version of SS you're using, and what modules you have installed?

  • Webdoc
    Avatar
    Community Member
    332 Posts

    Re: Problem with translations Link to this post

    Using version 2.3.3
    in config

    i18n::enable();
    global $allowed_i18n;
    $allowed_i18n = array('et' => "et_EE", 'en' => "en_GB", 'ru' => "ru_RU");
    i18n::set_locale('et_EE');
    Object::add_extension('SiteTree', 'Translatable');
    Translatable::set_default_locale('et_EE');
    Payment::set_site_currency("EEK");
    Currency::setCurrencySymbol(' ');

    if in estonian link what i have already made i select translate tab and choose language what is en_gb or ru_ru i get the strange adress as shown above

  • dalesaurus
    Avatar
    Community Member
    283 Posts

    Re: Problem with translations Link to this post

    I don't have much experience with the i18n stuff, but that seems to be a likely culprit. Anyone else?

  • frabraha
    Avatar
    Community Member
    49 Posts

    Re: Problem with translations Link to this post

    I get the same error, but I'm not using the i18n::enable();

    I only have Object::add_extension('SiteTree', 'Translatable');

  • marand
    Avatar
    Community Member
    9 Posts

    Re: Problem with translations Link to this post

    I have the same error, but only in IE 8 (SS 2.3.7, Translatable enabled)

    Strange thing with url, after translated page has been created.
    Translated page is created, but redirect to this new page dosen't work correctly.

    must be ...admin/show/70, but I have admin/show/50/admin/show/70
    where 50 - id of locale page and 70 - id of new, translated page.

    Maybe problem in CMSMain.php Link function, row 148?
    demo.silverstripe site has the same problem...

  • marand
    Avatar
    Community Member
    9 Posts

    Re: Problem with translations Link to this post

    Version 2.4 has the same problem, all works fine in Mozilla, Safari, Google Chrome and IE8 in Win7.
    This problem occurs only in Windows XP + IE.

    Seems, that IE under XP doesn't work correctly with cache. I found this post: http://www.silverstripe.org/general-questions/show/260267#post260267

    And I think, that something like this must be added:
    if (IE) {clear_all and return blank_URL}

    But I cant found, how and were the link generated after translating.
    Please help, all ideas are welcome!

  • dalesaurus
    Avatar
    Community Member
    283 Posts

    Re: Problem with translations Link to this post

    It appears that this is a IE specific bug, but it could be alleviated by using a random cache buster string on AJAX request (like all the js/css files carry).

    This is part feature, part bug. I think this should go in Trac for the core team to review: http://open.silverstripe.org

    1919 Views
Page: 1 2
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.