Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Translations and e-commerce


Go to End


5 Posts   1853 Views

Avatar
maildaemon

Community Member, 1 Post

3 March 2010 at 10:23pm

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

Avatar
ivo

Community Member, 19 Posts

15 March 2010 at 6:54am

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?

Avatar
Henk Poley

30 Posts

29 March 2010 at 1:58am

Edited: 29/03/2010 1:58am

Fix for translating included templates:

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

Will also be included in some future silverstripe update.

Avatar
Webdoc

Community Member, 349 Posts

28 May 2010 at 7:19am

Edited: 28/05/2010 7:21am

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

Avatar
Webdoc

Community Member, 349 Posts

28 May 2010 at 7:45am

after adding

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

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