Skip Navigation

This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 6 replies, has 2 voices.

Last updated by Thomas Henninger 1 year, 6 months ago.

Assisted by: Dražen.

Author Posts
July 10, 2023 at 11:33 am #13978797

Thomas Henninger

Hello,

If I add a new using via the admin new user php file - there I can add a language for the user profile.. after the creation I wanted to test if this values changes if I would use another langauge during the ordering in woocommerce .. but it did not.

My question is now .. where can I find the WooCommerce langauge from WPML? Where is it sotred if not in the profile data?

And why does this field there not get updated.. ?

user-langauge.jpg
July 10, 2023 at 11:49 am #13984989

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello!

Welcome to WPML Support.

The settings relate to WordPress backend language, it doesn't control the frontend, the user, or WooCommerce language. The option is there even without WPML plugins.

Order language is controlled by frontend language, and if you want to use a different order language than the one from which client is making an order then you can get the current language and switch language to another via with the next hooks:

- https://wpml.org/wpml-hook/wpml_current_language/
- https://wpml.org/wpml-hook/wpml_switch_language/

Please note we can not support or provide custom code, but I will be glad to share any more information if you need it.

Regards,
Drazen

July 10, 2023 at 11:56 am #13988359

Thomas Henninger

Just a question, its related.

We have a Shopsystem and sometimes we need to Order things for our customer Parters. They send an email or fax and we do it.

Is it possible to order something in the frontend in the german language (which is our langauge here) but for a customer it will show all up in another langauge?

Is there some way to do this? maybe related to the user role or something?

Greetings!

July 10, 2023 at 12:07 pm #13993303

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

the only way I can think of is for you to make an order programmatically and assign the user ID to that order.

For example:
- https://stackoverflow.com/questions/50382567/assign-the-user-id-to-an-order-created-programmatically-in-woocommerce-3

In such cases, you can also set order language via our hooks, and the user will see from his side as if they made an order in that language.

For custom work solution I suggest contacting WPML contractors:

- https://wpml.org/contractors/

Hope this helps.

Regards,
Drazen

July 10, 2023 at 12:11 pm #13993973

Thomas Henninger

Hello ! Thank you very much for this.

Would it be possible to hook into the ordering process - direclty in the ording process and there change the language? Like checking the order and before emails get send changing the langauge?

So I could do it with from the forntend?

I know thats totally out of scope here..

but this should be possible or?

Thanks!

July 10, 2023 at 12:34 pm #13998371

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hello,

I am not 100% sure, but probably could be done with some custom code, WooCommerce hooks, or creating some custom plugin switch to change the language of the order on request and then proceed with that order language.

But as said, it will probably require custom coding/solution to achieve this, it is not out of box solution.

Regards,
Drazen