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.

Related documentation: WooCommerce Multilingual – Run E-Commerce Sites in Several Languages

This topic contains 9 replies, has 3 voices, and was last updated by  Xavier 4 years, 10 months ago. The support staff assigned to this topic is sarah.n.

Author Posts
Author Posts
October 27, 2013 at 4:13 pm #282702

Xavier

Hello,

my WPML language format use different languages in directories:

/woocommerce/
/woocommerce/en/

That's how I want it. But, with the setting above, I would like to know if it is posible to use a language parameter to show its content.

I have tried the "lang" parameter but it doesn't work:

index.php?product=my-product&lang=en

Thank you.

October 28, 2013 at 7:16 am #282788

Andreas Neuber
Forum moderator

Supporter languages: English (English ) German (Deutsch )

Hello Xavier,

Though practical I'm quite sure that this is not possible since our plugin checks/rewrites the url when a page is loaded.
It would require some custom programming, question is how much - let me inquire about that.

--
sitepress.class.php => lines 392 ff.

October 28, 2013 at 9:55 am #282911

Xavier

Hi Andreas, do you remember that I need to create pretty slugs for traslated taxonomies?

You told that it is not possible to get these permalinks:

/marca/apple/ (spanish)
/brand/apple/ (english)

and they must be something like:

/brand/apple/ (spanish)
/brand/apple-en/ (english)

So, I was trying to create htaccess rewrite rules to get it how want:

RewriteRule ^en/brand/([^/]+)/?$ index.php?product_brand=$1&lang=en [L]

That's why I need to get the WPML language variable.

Looking forward your answer.

Thanks.

October 28, 2013 at 12:56 pm #283089

Andreas Neuber
Forum moderator

Supporter languages: English (English ) German (Deutsch )

Hi Xavier,

I see, thats why.
What I forgot - could try this:
> Under "WPML > Languages > Language Switcher Options > Preserve URL parameters"
> Add "lang" there

Any difference?

October 28, 2013 at 6:01 pm #283304

Xavier

No difference.
Thanks.

October 29, 2013 at 10:54 am #283625

sarah.n
Forum moderator

Supporter languages: English (English )

Xavier,

This is Sarah here. Andreas forwarded your forum thread to me so this is why I am replying here.

I would suggest you try this new service we have available: hidden link
You will get the custom assistance you need to get on with your project.

October 30, 2013 at 6:29 pm #284549

Xavier

I don'tm know what's going on but It's imposible to contact this service through their website: When I click on submit I get this message: "Order custom work. Thank you for submitting your request. We will review your request and contact you shortly.". But I never explained my needs.
Thanks.

October 31, 2013 at 7:01 am #284666

sarah.n
Forum moderator

Supporter languages: English (English )

Let me find out what is happening Xavier and I'll get back to you shortly.

October 31, 2013 at 7:25 am #284672

sarah.n
Forum moderator

Supporter languages: English (English )

Xavier,

What you can do in the meantime is contact the developer responsible for custom work directly.
His name is Bernat and his email: bernat.t[at]icanlocalize[dot]com
Send him your detailed description of the task and he will respond directly 🙂

Thank you!

November 15, 2013 at 9:04 am #292888

Xavier

The developers told me that they are working to get that parameter on further versions.