Hi,

the translated strings "Billing information" and "Shipping information" are not translated at the checkout-page and at "de/admin/commerce/config/checkout" but at "de/admin/commerce/customer-profiles/types" they are.

Worked fine in 1.1. Updated to 1.2 and installed shipping module. My customer will bite my head off :)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MickL’s picture

same for "Order total" at checkout page. The string is translated when editing the view.

MickL’s picture

Category: bug » support
Priority: Major » Normal

i found out that i needed to activate "field translations". it is already part of the internationalization module. now i could theoretically translate the strings Billing information and Shipping information BUT when I click on edit there is the field "english" (original text) instead of "german" (default language). When adding a third language (dutch) i COULD translate it into dutch but still not into german.

I created an issue for that with screenshots but maybe it is a problem of commerce?

http://drupal.org/node/1454360

The translation of "order total" is a duplicate of http://drupal.org/node/1121722 which is still not solved.

akalam’s picture

Same problem, didn't work for me
After installing the "field translation" module I found the strings "Billing information" and "Shipping information" at translate interface.
But after translation, I see http://example.com/user/39/orders/77 with both strings untranslated

akalam’s picture

Sorry, I found it, it is not under translate interface, but if you go to:
http://example.com/admin/commerce/config/order/fields
and then to edit fields "Billing information" and "Shipping information" you will find a "translate" tab where to manage those strings!

Anonymous’s picture

I have the same issue..

I wrote this patch.. haven't tested it yet

Anonymous’s picture

whoops...

wrong directory..

Anonymous’s picture

The (dutch) translation of "Billing information" is now working on my site.. so i would suggest the patch..
I haven't implemented the Commerce Shipping module yet.. so maybe one of you guys could test it for me..

The problem was that the original code used an untranslated instance label, where the profile type name should be used.

elmotri’s picture

Status: Active » Reviewed & tested by the community

Works for me with billing and shipping.

MickL’s picture

FileSize
49.28 KB

does it fix the problem? I attached a screenshot of the problem.

no2e’s picture

Version: 7.x-1.2 » 7.x-1.x-dev
Category: support » bug

The patch by wbressers (#6) works for me, too.
Please commit this.

Ske’s picture

The patch works great for me but the same problem is on the view oders page. As example, "Billing information:" does not translate in user/1/orders/2. Have anyone a hint to find the right place to fix this?

dready2011’s picture

subscribe

no2e’s picture

As example, "Billing information:" does not translate in user/1/orders/2.

It is translated at my site.
But I don't know if it is translated because of the patch (#6) or if it worked before.

Anonymous’s picture

I've noticed also similar translation issues on other parts of the commerce module..

i'll try to fix them as soon as i've found the time..

samuel.pismel’s picture

wbressers maybe this can help you: #1454360: Field translation - only english ?!

tregismoreira’s picture

The patch #6 works for "Billing information" label, but not for "Order total". :(

So, the patch #37 works fine for "Order total" string.

greenmother’s picture

#6 works fine for me (for "Shipping information"), thanks

rszrama’s picture

Assigned: Unassigned » helior
Status: Reviewed & tested by the community » Needs review
Issue tags: +1.3 review

Let's get a review in of this before 1.3. We'll need to reproduce the multi-lingual scenario before we can commit it, because a simple reading of the patch doesn't make it immediately obvious to me how this is fixing the problem. I would've expected us to want to preserve the old ordering. With the patch, it just appears to prioritize the name coming from the customer profile type itself, which I wouldn't have supposed would be translatable through the interface.

helior’s picture

Status: Needs review » Reviewed & tested by the community

field_info_instance() does not return localized info, so it's not a reliable source for getting a localized label for the pane header. The documentation for hook_commerce_customer_profile_type_info() specifies that the "name" key should be translatable, so taking preference to this info is the right direction.

rszrama’s picture

Status: Reviewed & tested by the community » Needs work

Ahh, I must have taken the red herring about field translation up above. I suppose that's what was needed for other parts of the interface but that that wasn't sufficient for the checkout form. The thing is... $profile_type['name'] will never turn up empty. It's a required parameter of customer profile types, so we'll never have a fallback to the instance label. I'm wondering what we should do about that.

For example, right now on a single language website, I can go change the label of the customer profile reference field on the order to anything else and have that appear as the title of the checkout pane. This patch will remove that possibility, because the name of the profile type will always be used.

Perhaps we just need an extra bit of optional integration to the field translation module to pick the language specific instance label if it exists. I feel like we're doing that elsewhere in the code... ahh, for attribute field options in the Cart module (grep the source for i18n to see where).

Moving back to needs work, as this is a feature regression as is.

helior’s picture

Status: Needs work » Needs review
FileSize
1.27 KB

Makes sense. i18n_field integration added - best of both worlds :)

rszrama’s picture

Status: Needs review » Fixed

Huzzah! With the patch applied, I was able to translate "Billing information" to "Informations de facturation" in the Translate interface for field labels and have it show up just fine when visiting /fr/checkout/[order-id]. Committing #21, which is dependent on i18n_field.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Summit’s picture

Hi,

This patch works great.

For documentation purposes:

1)
You have to go to this page admin/config/regional/i18n/strings
And set the language to english..than the translation strings can be made to your language.

2)
You need to go to admin/config/regional/translate/i18n_string and enable

Select text groups
 Fields

3)
Then the fields are between the normal translation page to be able to translate: admin/config/regional/translate/translate

4)
After adding translation and nothing showing, back to admin/config/regional/translate/i18n_string
Enable Fields and click REFRESH.

Greetings, Martijn

Jax’s picture

The label is escaped twice. Try to translate the shipping information label to: "Données d'expédition" and you will see the html entity in the fieldset legend. Should I reopen this ticket or create a new one?

Jax’s picture

It's the check_plain that is too much for the title. The title will be escaped again when it is rendered.

Jax’s picture

Assigned: helior » Unassigned
Status: Closed (fixed) » Needs review
FileSize
748 bytes

And the patch.

Status: Needs review » Needs work

The last submitted patch, 1451132-translate-profile-labels.patch, failed testing.

Jax’s picture

Status: Needs work » Needs review
FileSize
712 bytes

Patch against HEAD instead of 1.3.

vasike’s picture

All this translations could be achieved just by using Field translation (i18n_field) module from i18n package.
No patch needed.
I am using Drupal Commerce 7.x-1.3 and i18n 7.x-1.5

p.s. : without Field translation (i18n_field) module i am not able to have the translations.

FAAREIA’s picture

Status: Needs work » Needs review

I think the translation should be done by core modules OR i18n module. I have only 1 language and i won't install a complex module to translate one string, it has no sense.

rszrama’s picture

Status: Needs review » Needs work

Hey Jax, I can't commit the patch as is, because for untranslated fields you actually don't get sanitization on the instance label. For example, I was able to execute JavaScript if I just added it to the instance label on a single language site. I'm happy to update the code so that we only sanitize the label for output if translation does not occur, but I'm actually at a loss to know why this is being sanitized in the first place. When I follow the code through for field translation, it looks like sanitization should be off by default. Do you have any insight there? I'd hate to just always assume translated instance labels are sanitized and open up a security hole.

Jax’s picture

Sometimes sanitized and sometimes not? That isn't very practical. I'll try to find time to have a look at that this week.

rszrama’s picture

Yeah, it really is odd. And really I can't figure out why i18n_field is sanitizing when by all appearances it sets sanitize => FALSE by default for object translation. : ?

ntigh52’s picture

Status: Needs review » Needs work

I found that if on admin/commerce/config/checkout/form/pane/customer_profile_billing
I chenge the Checkout pane configuration -> Related customer profile reference field -> -None-
then the "Billing information" fieldset display translate.
I want to Related customer profile reference field to Billing information but ....
Hopes will help anything.
Thanks

vasike’s picture

i think this issue is (very) related with #1121722: Improve DX of instance translation issue, if not they are the same.

quiptime’s picture

Translate "Billing information", "Shipping information" and "Order total" is possible and works.

But,

the problem is the missing documentation to do this.

AdamGerthel’s picture

So, how do you translate it? Using i18n is not an option for me because the website only has one language. Installing such a huge package just for this is insane.

quiptime’s picture

Using i18n is not an option for me because the website only has one language. Installing such a huge package just for this is insane.

Exactly that is the problem.

Needed modules:

Entity Translation
Field translation (i18n part module)

FAAREIA’s picture

@AdamGerthel. I have the same issue, i will not install i18n for two words. Try patch #6, it works for me, but i think it's not te correct way to go.

DuaelFr’s picture

#29 works for me but I agree it is a bit overkill

rszrama’s picture

The patch in #29 is insecure per my comments in #32.

DuaelFr’s picture

You are right but it is a moderated security flaw because specific permissions are needed to exploit it.
Actually, only my user#1 can access this settings so I prefer something working instead of an untranslated string on my client's website :/

AdamGerthel’s picture

So... Is there a temporary workaround? Having mixed languages in the checkout is very likely to scare customers off.

rszrama’s picture

I'm not particularly interested in committing a half solution, so honestly this just needs to be pursued through i18n as described in my comments above.

corbin’s picture

Title: Translation issue "Billing information" + "Shipping information" » Translation issue "Billing information" + "Shipping information" + "order total" + ... "or" !!!

... one more with the "or" at the foot of each page of the checkout;
a good idea if you can't sleep : open your favorite editor and try to find "or" in kickout ;oD !
i mean :-((((

FAAREIA’s picture

yeah...'or' word is a pain. it's redundant, since there are two buttons, one next to the other.
cleanup =)

corbin’s picture

i'd like to clean it up .. but where is it ?!

rszrama’s picture

Title: Translation issue "Billing information" + "Shipping information" + "order total" + ... "or" !!! » Translation issue "Billing information" + "Shipping information"

The "or" comes from commerce_checkout.pages.inc and was included to imitate other checkout systems (such as Shopify). That said, it's fully translatable through the normal translation interface and is not related to this issue. Additionally, there's a separate issue that will wrap that "or" in a class so it's easily themed out, and in the meantime it can just be form altered out. ; )

And again, all this issue needs is for my someone to research the lead I give in comment 32. None of the comments have changed anything since then.

golubovicm’s picture

Comment #24 works fine for me. Try it before applying any patch.

farald’s picture

If you just want to quick-fix the translation on checkout, you can do this:

/**
 * Implements hook_form_alter();
 */
function custom_stuff_form_alter(&$form, &$form_state, $form_id) {
  // Fix translation on checkout form
  if ($form['#id'] == 'commerce-checkout-form-checkout'){
    if(isset($form['customer_profile_billing'])){
      $form['customer_profile_billing']['#title'] = t('Billing information');
    }
    if (isset($form['customer_profile_shipping'])){
      $form['customer_profile_shipping']['#title'] = t('Shipping information');
    }
  }
  // Fix translation on checkout review
  if ($form['#id'] == 'commerce-checkout-form-review'){
    if (isset($form['checkout_review']['review']['#data']['customer_profile_billing'])){
      $form['checkout_review']['review']['#data']['customer_profile_billing']['title'] = t('Billing information');
    }
    if (isset($form['checkout_review']['review']['#data']['customer_profile_shipping'])){
      $form['checkout_review']['review']['#data']['customer_profile_shipping']['title'] = t('Shipping information');
    }
  }
};

Much more lightweight than adding a bunch of modules :)

yatil’s picture

I used the solution in #51 and added a translation for 'Order total' also. Probably there are better ways to handle this, but it does the job. Just add the following to your template.php file:

/**
* Implements hook_form_alter();
*/
function YOURTHEME_form_alter(&$form, &$form_state, $form_id) {
  // Fix order total translation
  if (isset($form['cart_contents'])){
    $form['cart_contents']['cart_contents_view']['#markup'] = str_replace('Order total', t('Order total'), $form['cart_contents']['cart_contents_view']['#markup']);
  }
  // Fix translation on checkout form
  if ($form['#id'] == 'commerce-checkout-form-checkout'){
    if(isset($form['customer_profile_billing'])){
      $form['customer_profile_billing']['#title'] = t('Billing information');
    }
    if (isset($form['customer_profile_shipping'])){
      $form['customer_profile_shipping']['#title'] = t('Shipping information');
    }
  }
  // Fix translation on checkout review
  if ($form['#id'] == 'commerce-checkout-form-review'){
    if (isset($form['checkout_review']['review']['#data']['customer_profile_billing'])){
      $form['checkout_review']['review']['#data']['customer_profile_billing']['title'] = t('Billing information');
    }
    if (isset($form['checkout_review']['review']['#data']['customer_profile_shipping'])){
      $form['checkout_review']['review']['#data']['customer_profile_shipping']['title'] = t('Shipping information');
    }
  }
};
FiNeX’s picture

Both #51 and #52 only fix commerce checkout forms (btw, #52 works fine), but the translation should be done on review page too.

farald’s picture

Status: Needs work » Needs review
FileSize
669 bytes

If we need the check_plain, how about just adding a t() ?

rszrama’s picture

Status: Needs review » Needs work

t() cannot be used to wrap variables, as we have to point out in every issue dealing with internationalization at some point in time. : P

It can only wrap string literals per its documentation.

farald’s picture

D'oh! Of course! :)

kaido.toomingas’s picture

I just made a little module based on #52. https://github.com/kaido24/commerce_lang_repair . Its really only copy paste but its much better than use this as a theme function..

farald’s picture

The easiest for single-language sites is to :

  1. Create a feature with the Shipping information & Billing information fields.
  2. Edit the feature code and translate the text directly there.
  3. Revert features.

Problem solved.

Olafski’s picture

Thanks for your module, kaido24! It's really helpful as I don't want to use i18n. Commerce Language Repair works well during checkout but it doesn't seem to affect admin order pages like admin/commerce/orders/1. Do you intend to support the translations there, too?

kaido.toomingas’s picture

Short answer is no.. I just dont have to time and motivation at this point. But if someone tracks this variable down then I can do it.

ram4nd’s picture

#54 worked for me, thank you

Anonymous’s picture

@Summit thanks for your instructions in #24 - saved me a lot of time!

astutonet’s picture

The Order total and others solved by instructions in #24. This saved me a lot of time too.

But when a try to translate expressions like as

Your order is number [commerce-order:order-number]. You can <a href="[commerce-order:url]">view your order</a> on your account page when logged in.

I receive a message of error, saying that expression have HTML not allowed.

Any ideas?

ntigh52’s picture

maybe is helping?!

astutonet’s picture

@ntigh52, tks to the answer.

Are you saying me to "try to clear language field in action that sending message."?

I tried to do this, but nothing. Can you help me? How you did this?

Tks

ntigh52’s picture

where do you try to translate this line?!
rules?!
translateion window?!?!

astutonet’s picture

@ntigh, ok.

To translate this, access admin/commerce/config/checkout/form/pane/checkout_completion_message

Tks

candelas’s picture

thanks :)

steveoriol’s picture

The above tips work well for the translation of "Billing Information" and "Shipping Information" in the background processes of payment, but in pages like :
"user/xxx/invoices/xxx" or "user/xxx/orders/xxx" or "admin/commerce/orders/xxxx/view"
, translation does not work ... :-(

gianfrasoft’s picture

#57 is the solution for me. Well done, @kaido24. I say "If Mohammed will not go to the mountain, the mountain must come to Mohammed".

Thank you.

gianfrasoft’s picture

... But #57 doesn't translate "Order total" on Shopping Cart Summary:

user/X/orders/Y

kaido.toomingas’s picture

Yes its only for this one form.. And its not really the right way to do it.. If you dont find better solution you can pm me and we will find some solution..

gianfrasoft’s picture

Ok, as a temporary solution I changed fields' label in order type's page:

admin/commerce/config/order/fields

This way I changed "Billing informations" label only.

The definitive solution is, I think, installing Internationalization module but I'll not do it because my site is shown in one only language.

Hope this helps...

gianfrasoft’s picture

And for "Order Total" label in order's detail I used this patch:

http://drupal.org/node/1776644#comment-7372464

Hope this helps, too.

Bye.

bojanz’s picture

Category: bug » support
Status: Needs work » Fixed

There is nothing more to be done.
I have tested translation with i18n_field 1.8, could translate everything (billing information, order total, etc), and had no double-escaping problems.
Since the original report of that is a year old and there have been i18n releases in the meantime, I am assuming that got fixed.
(Especially since I have confirmed that the code is explicit about requesting non-sanitized strings).

You will always need i18n_string and i18n_field to fully translate a Drupal 7 site, Commerce or no Commerce.

gianfrasoft’s picture

Nono, this isn't true!

I Made dozens of drupal sites in my home language: italian, and I always used only locate module without Internationalization module.

Mine are not multilanguage sites but I have to translate everything the same. I can't install a so big module (i18n and some submodules) to translate 1 or 2 strings! Do you agree?

rszrama’s picture

I suppose the question is how are you translating field labels and option values apart from i18n?

bojanz’s picture

There is no way to translate a field instance label, help text, allowed values without i18n.
The Commerce team can't fix D7's multilingual problems. This is just the way it is. Feel free to help D8 become better (it already is, by a long shot).

i18n_string and i18n_field are relatively small modules (other i18n modules can remain disabled, and they are not enabled or installed), so I'm not accepting that as an argument.

gianfrasoft’s picture

Any module have to process any string and label by using t() function. So I don't need any i18n module in my translation activity, only locale module is the module I need.

If I have to install i18n to translate commerce module's string, there is something wrong in commerce module, I think...

zambrey’s picture

I have to agree with gianfrasoft about installing i18n module for one-language site.
It's just too much for translating few strings.
I'm using this little function to change field labels:

function _change_field_label($field_name, $new_label) {
  $record = db_select('field_config_instance', 'inst')
    ->fields('inst')->condition('field_name', $field_name)->execute()->fetchObject();
  $data = unserialize($record->data);
  $data['label'] = check_plain($new_label);
  db_update('field_config_instance')
    ->fields(array('data'=>serialize($data)))
    ->condition('id', $record->id)
    ->execute();
}

Maybe someone will find this useful. Cheers.

bojanz’s picture

You are free to ask any drupal core developer and / or multilingual expert (Gabor Hojtsy, for example) for a second opinion, and you will get the same reply.
Drupal's locale module can't translate a field instance title (such as "Billing information"). Hence, i18n_field.

This is my last reply on this subject.

kloewer’s picture

#24 does the trick!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

webxtor’s picture

Thanks, this (#24) helped me to solve my translation issues without any source codes alteration!

sw3b’s picture

For me #58 solve my probleme... thanks !

haggins’s picture

FileSize
1.6 KB

#57 is working fine. However, it misses Order total on the review form.

I also cleared the code so that it uses $form_id instead of $form['#id'].

Another issue with that fix was, that it replaces all occurences of Order total of the whole cart table - including product titles. As the shop sells event tickets and some bands may have crazy names, I won't bet on that this string doesn't occur in any title ;)
So I search and replace Order total</td> instead.

Attached is the updated helper module.

Anybody’s picture

I can confirm that there is still a problem with this. I've installed DC in my German site (using i18n and co) and "Source Language" was set to "German".

The problem is, that the fields are locked and the imported Text "Billing information" / "Order total" are used as German(!) translated field titles that are not editable!
Even "Translation Table" did not help here, which is normally very helpful for these cases.

Only solution was to translate the binary field in the database...

gianfrasoft’s picture

You have to translate some commerce views, too...

Anybody’s picture

I did what was possible, but that's not possible for the fields named above, because they are not editable in the views. "Order total" is part of a fixed output in the views footer - without customization possible (or am I wrong?)

"Billing information" is a not a view, but a field in the checkout. Same problem as described above. But perhaps this is not a real DC problem, but a general problem in Drupal translation. My point was firstofall to describe the steps to reproduce this problem!

a.milkovsky’s picture

This is the work around how to get translatable titles for panes:

/**
 * Implements hook_commerce_checkout_pane_info_alter().
 */
function MYMODULE_commerce_checkout_pane_info_alter(&$panes) {
  $panes['customer_profile_billing']['title'] = t($panes['customer_profile_billing']['title']);
  $panes['customer_profile_shipping']['title'] = t($panes['customer_profile_shipping']['title']);
}

If you want to get all the titles translated you can use this code:

/**
 * Implements hook_commerce_checkout_pane_info_alter().
 */
function MYMODULE_commerce_checkout_pane_info_alter(&$panes) {
  foreach($panes as $key => $pane) {
    $panes[$key]['title'] = t($panes[$key]['title']);
  }
}
dotoree’s picture

In order to translate 'Order total' you can use the theme function from commerce.price module:

/**
 * Just use the theme function to translate order total
 */
function MYTHEME_commerce_price_formatted_components($variables) {
  // Override default commerce Order total title
  $variables['components']['commerce_price_formatted_amount']['title'] = t('Order total');

  // Add the CSS styling to the table.
  drupal_add_css(drupal_get_path('module', 'commerce_price') . '/theme/commerce_price.theme.css');

  // Build table rows out of the components.
  $rows = array();

  foreach ($variables['components'] as $name => $component) {
    $rows[] = array(
      'data' => array(
        array(
          'data' => $component['title'],
          'class' => array('component-title'),
        ),
        array(
          'data' => $component['formatted_price'],
          'class' => array('component-total'),
        ),
      ),
      'class' => array(drupal_html_class('component-type-' . $name)),
    );
  }

  return theme('table', array('rows' => $rows, 'attributes' => array('class' => array('commerce-price-formatted-components'))));
}

In order to translate Shipping, billing and order total in forms you can use this code:

/**
 * Implements hook_form_alter().
 *
 * Fixes translation issues for Order total, Shipping Information, Billing information.
 * @see http://www.konordo.com/node/90
 */
function MYTHEME_form_alter(&$form, &$form_state, $form_id) {
  // Fix order total translation
  if (isset($form['cart_contents'])){
    $form['cart_contents']['cart_contents_view']['#markup'] = str_replace('Order total', t('Order total'), $form['cart_contents']['cart_contents_view']['#markup']);
  }
  // Fix translation on checkout form
  if ($form['#id'] == 'commerce-checkout-form-checkout') {
    if(isset($form['customer_profile_billing'])){
      $form['customer_profile_billing']['#title'] = t('Billing information');
    }
    if (isset($form['customer_profile_shipping'])){
      $form['customer_profile_shipping']['#title'] = t('Shipping information');
    }
  }
  // Fix translation on checkout review
  if ($form['#id'] == 'commerce-checkout-form-review') {
    if (isset($form['checkout_review']['review']['#data']['customer_profile_billing'])){
      $form['checkout_review']['review']['#data']['customer_profile_billing']['title'] = t('Billing information');
    }
    if (isset($form['checkout_review']['review']['#data']['customer_profile_shipping'])){
      $form['checkout_review']['review']['#data']['customer_profile_shipping']['title'] = t('Shipping information');
    }
  }
}
semanthis’s picture

this problem still exists. I have a DC-Installation in German language, I defenetly do not want to install i18n just to translate one single string. By the way, maby you'd like to use commerce for other purposes then selling products, so it would be smart to have a opportunity to change the lable, either in the pane-settings or in the view. I belive this is more then a just a translation issue.

MyriamB’s picture

#91 second code worked perfectly for me, thank you! I implemented it into a custom module instead of my theme.

odw_calvin’s picture

Issue summary: View changes

#4 worked well for my "shipping information" translation.

Cyclodex’s picture

It looks one can not even change the title after you created it once yes ?
Thanks to #91 which solves the problem for now. I can translate the strings now or change it.

kpatsali’s picture

#91 works for translating Order total label on commerce Shopping cart
Thank you soooooooooooo much

Damien Tournoud’s picture

Drupal Commerce is fully translatable, and committed to stay that way.

Translating field labels (like "Billing information" and "Shipping information") in Drupal (and Drupal Commerce) simply requires the i18n_field module, part of the i18n package.

No crazy hacks are necessary. Locking this issue for future reference.

dmegatool’s picture

Damien Tournoud is right. I installed the i18n_field module and could translate the missing strings just fine.

dmegatool’s picture

And set the source language as english in internationalisation : admin/config/regional/i18n/strings

kerios83’s picture

cause of https://www.drupal.org/node/2227523 do not use i18n-7.x-1.11, try the dev version instead.

PhilY’s picture

Sorry for reopeng the issue but I'd like to contribute to comment #91 second code for anyone using the Commerce Addressbook module as shipping and billing titles are not translated neither.

All needed is to insert the following code inside the hook_form_alter function:

  // Fix translation on checkout addresses
  if ($form['#id'] == 'commerce-checkout-form-adresses') {
    if(isset($form['customer_profile_billing'])){
      $form['customer_profile_billing']['#title'] = t('Billing information');
    }
    if (isset($form['customer_profile_shipping'])){
      $form['customer_profile_shipping']['#title'] = t('Shipping information');
    }
  }

so the full function is (as per comment #91, second code):

/**
 * Implements hook_form_alter().
 *
 * Fixes translation issues for Order total, Shipping Information, Billing information.
 * @see http://www.konordo.com/node/90
 */
function MYTHEME_form_alter(&$form, &$form_state, $form_id) {
  // Fix order total translation
  if (isset($form['cart_contents'])){
    $form['cart_contents']['cart_contents_view']['#markup'] = str_replace('Order total', t('Order total'), $form['cart_contents']['cart_contents_view']['#markup']);
  }
  // Fix translation on checkout form
  if ($form['#id'] == 'commerce-checkout-form-checkout') {
    if(isset($form['customer_profile_billing'])){
      $form['customer_profile_billing']['#title'] = t('Billing information');
    }
    if (isset($form['customer_profile_shipping'])){
      $form['customer_profile_shipping']['#title'] = t('Shipping information');
    }
  }
  // Fix translation on checkout addresses // ADDED FOR COMMERCE ADDRESSBOOK SUPPORT
  if ($form['#id'] == 'commerce-checkout-form-adresses') {
    if(isset($form['customer_profile_billing'])){
      $form['customer_profile_billing']['#title'] = t('Billing information');
    }
    if (isset($form['customer_profile_shipping'])){
      $form['customer_profile_shipping']['#title'] = t('Shipping information');
    }
  }
  // Fix translation on checkout review
  if ($form['#id'] == 'commerce-checkout-form-review') {
    if (isset($form['checkout_review']['review']['#data']['customer_profile_billing'])){
      $form['checkout_review']['review']['#data']['customer_profile_billing']['title'] = t('Billing information');
    }
    if (isset($form['checkout_review']['review']['#data']['customer_profile_shipping'])){
      $form['checkout_review']['review']['#data']['customer_profile_shipping']['title'] = t('Shipping information');
    }
  }
}