Discussions

How do I know the language in which an order was placed?

I have a multilingual site and i have performed the following tests:

(1) with an anonymous user, place an order entirely en English and the email a@example.com

(2) with an anonymous user, place an order entirely in French and the email b@example.com

Drupal Commerce creates user accounts associated with these orders, but the language is always the default language of the site.

Is there a way to do either of the following:

(a) when creating a user, use the current language of the interface?
(b) obtain information about which language the order was placed in?

Cheers,

Albert.

Posted: Nov 11, 2013

Comments

bohemier on August 21, 2015

I am facing the same issue, except I am using anonymous checkout... trying to figure this one out... When an order is created by an anonymous user, emails are sent using the current site language which is ok. But when using the admin interface to manage orders, the emails are sent according to the language of the site being used when administering the orders.

Edit: Here's how I fixed this: https://www.drupal.org/node/2278831#comment-10246303