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 18 replies, has 2 voices.

Last updated by Shekhar Bhandari 2 months, 4 weeks ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
July 3, 2019 at 1:33 am #4130743

kamalpreetS

I wanted to understand WPML's setup. Please see our website here:

hidden link
hidden link
hidden link

We don't really have anything on the main directory other than the landing page to select the countries. What are your recommendations on the x-default language and main website?

Should we replicate the USA website and make it x-default so that main website stays as the default? What are your recommend practices for developing the website in WPML typically.

I found this website uses WPML and did it well: hidden link

Baljot

July 3, 2019 at 5:08 am #4131807

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Thanks for writing in! I’m happy to help out.

Since the .com site doesn't have any languages associated you can use x-default on that page.

More details:
- hidden link
- To add x-default with WPML, use the solution provided here: https://wpml.org/forums/topic/x-default-an-other-issue/#post-1556554
- https://wpml.org/documentation/plugins-compatibility/using-wordpress-seo-with-wpml/

Let me know if this helps.

Thanks

July 4, 2019 at 9:13 pm #4146373

kamalpreetS

Hi Shekhar,

Right now we labelled the .com as the "Global" language for the root directory. But how would we add x-default to that?

When you visit here, it doesn't say x-default: hidden link

Can you advise on what the best setup for this is?

July 4, 2019 at 9:17 pm #4146379

kamalpreetS

Sorry in addition to my last message. Please see our language setup right now (attached).

What is your recommendation. Should I just make the global language "x-default" instead of "en"? Please advise.

Baljot

July 5, 2019 at 3:16 am #4147203

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Did you try the solution provided on my previous reply? Could you please try this and let me know if this helps?

To add x-default with WPML, use the solution provided here: https://wpml.org/forums/topic/x-default-an-other-issue/#post-1556554

Look forward to your reply.

Thanks

July 5, 2019 at 3:36 am #4147349

kamalpreetS

Hi there,

I tried it and it added x-default but that's on top of the "en" language too. Wouldn't it make sense to use the attached screenshot to edit it to x-default? What are your thoughts?

Also, I was planning on replicating the /us/ website completely over to an x-default theme which is the .com (en) currently. Would that work and what's the steps involved to do this cleanly?

Baljot

July 5, 2019 at 3:57 am #4147441

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Wouldn't it make sense to use the attached screenshot to edit it to x-default? What are your thoughts?

No this is not possible right now.

Also, I was planning on replicating the /us/ website completely over to an x-default theme which is the .com (en) currently. Would that work and what's the steps involved to do this cleanly?

I request you to use the root page instead and use css for it, if this works for you, more details here: https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/#what-is-a-root-page-and-do-i-need-one

Let me know if this helps.

Thanks

July 5, 2019 at 4:00 am #4147443

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Also, while adding the code did you changed the

$lang_code == apply_filters('wpml_default_language', NULL )

to

$lang_code == apply_filters('wpml_default_language', 'en')

once and see if that helps?

July 9, 2019 at 8:18 pm #4174223

kamalpreetS

Hi there,

I'm sorry but I don't think you're understanding. Check out this WPML website: hidden link

The x-default website should be an actual website too that is functional. What if I replicate all of my pages on the /us/ to the root directory which is really called Global right now (/en/). What's the best practice here? I don't know if you're understanding.

July 10, 2019 at 11:58 am #4179817

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

The x-default website should be an actual website too that is functional. 

If so you can use the code to select the English languages and modify the hreflang code accordingly. https://wpml.org/forums/topic/x-default-language-vs-other-languages/#post-4147443

The feature is still not available so if the above solution doesn't work, I request you to contact the contractors for further help.

At this point, I would suggest you consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/

Before doing so please have a look also here:
http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

You will get the custom assistance you need to get on with your project.

Thanks

July 16, 2019 at 10:03 pm #4224233

kamalpreetS

Hi Shekhar,

So are you confirming that I can actually duplicate everything into my global language which is "en" but change that "en" language to "x-default"?

Do you see what I mean? Can I change the "en" to "x-default"? With the code you provided before?

Or else it'll be x-default, en, en-ca, en-us which I don't need the standalone "en".

Baljot

July 16, 2019 at 10:09 pm #4224259

kamalpreetS

In addition to my last email, is it okay having duplicate content from the en-us and on the x-default?

July 17, 2019 at 4:27 am #4225825

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Do you see what I mean? Can I change the "en" to "x-default"? With the code, you provided before?
Or else it'll be x-default, en, en-ca, en-us which I don't need the standalone "en".

I think you can change it, custom code support is outside the scope of our support being so the provided custom code is without any warranties and support, you can try it once and see if it helps.

If the solution doesn't help, I would suggest you consider contacting one of our certified partners from this link: http://wpml.org/documentation/support/wpml-contractors/

Before doing so please have a look also here:
http://wpml.org/documentation/support/wpml-contractors/guidelines-for-people-looking-for-consulting-help/

You will get the custom assistance you need to get on with your project.

is it okay having duplicate content from the en-us and on the x-default?

If you duplicate content from en-us to en, google will find it as a duplicate content. So you can duplicate content and mark it as an independent translation.

Let me know if this helps.

Thanks

July 17, 2019 at 2:08 pm #4231027

kamalpreetS

Hi there,

Sorry final question before we close this off.

I need clarification here:

If you duplicate content from en-us to en, google will find it as a duplicate content. So you can duplicate content and mark it as an independent translation.

If the x-default and en-us are both the same content, what's the issue? They're separate languages no?

July 18, 2019 at 8:19 am #4235965

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

If the x-default and en-us are both the same content, what's the issue? 

I am not exactly sure how the Search engine treats these contents but since it will be marked as a duplicate one of the languages might not be indexed properly. Being so I request you to mark those as independent content.

Let me know if this helps.

Thanks