Closed (duplicate)
Project:
Commerce Core
Version:
7.x-1.x-dev
Component:
Internationalization
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Nov 2011 at 19:06 UTC
Updated:
7 Dec 2014 at 16:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rszrama commentedIf I'm not mistaken, it's because these items are coming from fields. Their labels would need to be translated using some sort of field translation module.
Comment #2
damien tournoud commentedYou need the i18n_fields module.
Comment #3
ñull commentedI was able to translate the "Billing information" and "Shipping information" with i18n_field (part of i18n module) but still don't know where "Order total" can be translated. It is not among the fields I found.
Comment #4
rszrama commentedCan you please post a screenshot of what you're talking about?
Comment #5
ñull commentedAs you can it is Spanish except the "Order Total". You can see this both in /checkout/ and /checkout//review
Comment #6
rszrama commentedOk, that part of the page is generated by the Price field display formatter called "Formatted amount with components".
The particule code comes from commerce_price_field_formatter_view around line 439:
Notice that it's just using the label of the Price field instance, in particular the Order Total price field attached to orders. I'd expect you to be able to translate this label like any other field label with i18n_fields. Is this not the case?
Comment #7
ñull commentedOk I found now where I need to translate it, but now something else is wrong. Something I noticed once in a D6 system. I still don't know how it got solved, because suddenly with an upgrade it was solved.
I explain. In /admin/commerce/config/order/fields/commerce_order_total/translate I find the following:
What you see is that "suddenly" the original language is set as Spanish, but when you look at the label it is not, it is in the English language. Editing is not possible because it is locked. Translating the English has no use, because it will never appear when in Spanish mode.
Spanish as original language should never happen in Drupal. The original language of Drupal is always English and in my case the translated second language is Spanish.
I bumped the old issue here. Nobody took care so now it happened again.
Comment #8
ñull commentedI noticed that changing the default language to English will change the original language back to that too.
I was able to translate the label now, but still I don't see that translation in the checkout. Was the path I indicated, where I did the translation, the right one?
Comment #9
ñull commentedUpgraded to 1.1. Same issue in this version.
I started looking and attach here a patch that worked for me. You'll have to check if this is the right thing to do. Since the strings already passed once through t() elsewhere in the code, I think it is valid.
Comment #10
ñull commentedComment #12
ñull commentedComment #13
amateescu commentedThe field label cannot (and should not) be translated by Drupal core since D7.2.
See issue #1157426: Field system uses t() incorrectly and inconsistently for Drupal core and #1157512: Labels are not translated with i18n_field for Drupal core. for a fix that will be added to the Internationalization module.
Comment #14
amateescu commentedAlso, duplicate of #1121722: Improve DX of instance translation.
Comment #15
raphael apard commentedI found this alternative : http://www.drupalons.fr/node/5247
It's works for me.
Comment #16
DrupalDan commentedI can't get the field label "Order total" translated. the sceenshot 1 is what it looks like when I search "Order total" as a field. And when I click on edit, I got the page as screenshot 2, with no filed shown up for me to enter the translation I want.
Did I miss anything or did it wrong?
Really want to get the issue fixed. All other fields and the module work great after all.