Jump to:

2076 Posts in 857 Topics by 449 members

E-Commerce Modules

SilverStripe Forums » E-Commerce Modules » Translations and e-commerce

Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.

Moderators: martimiz, Nicolaas, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 960 Views
  • maildaemon
    Avatar
    Community Member
    1 Post

    Translations and e-commerce Link to this post

    Hello,
    I'm facing a problem - For default language I set Bulgaria using /mysite/_config.php:
    Order::set_site_currency("BGN");
    i18n::set_locale('bg_BG');
    Object::add_extension('SiteTree', 'Translatable');
    Translatable::set_default_locale('bg_BG');

    When i'm in the main site everything is translated. In the e-commerce module only some fields catch the translation.
    My site uses SS - 2.3.6 and e-commerce module 0.5.4 and the latest bg_BG.php for /lang/
    Any help would be most welcome

  • ivo
    Avatar
    Community Member
    19 Posts

    Re: Translations and e-commerce Link to this post

    hi
    im facing the same problem.
    i guess its a bug in the templates, because the includes wont catch the right translation.
    just the translations for the parentpage do grip.

    so namespaces should be used:

    f.e. in the OrderInformation_Editable.ss
    it should state for line 1:
    <h3 class="orderInfo"><% _t("OrderInformation_Editable.ss.ORDERINFORMATION","Order Information") %></h3>

    and not just:
    <h3 class="orderInfo"><% _t("ORDERINFORMATION","Order Information") %></h3>

    but im not sure, maybe somebody more experienced can confirm this?

  • Henk Poley
    Avatar
    30 Posts

    Re: Translations and e-commerce Link to this post

    Fix for translating included templates:

    http://open.silverstripe.org/ticket/3400

    Will also be included in some future silverstripe update.

  • Webdoc
    Avatar
    Community Member
    329 Posts

    Re: Translations and e-commerce Link to this post

    Is there any fix yet i have english and estonian the default is estonian and when i switch to english the text is estonian not english added also the <% _t("templatename.ss.SOMEFIELD","translation") %> but it didnt help in ecommerce.

    Im using 2.4 stable and ecommerce 0.6 beta 1

  • Webdoc
    Avatar
    Community Member
    329 Posts

    Re: Translations and e-commerce Link to this post

    after adding

    if($this->dataRecord->hasExtension('Translatable')) {
    i18n::set_locale($this->dataRecord->Locale);
    }


    in mysite/page.php after css requierments worked like charm

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