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.

Our next available supporter will start replying to tickets in about 10.56 hours from now. Thank you for your understanding.

This thread is resolved. Here is a description of the problem and solution.

Problem: user has a site with 3 languages in different domain. Now he wants to add 3 more languages under directories

Solution: currently it's not possible to do it, you need to choose only one URL format and stick to it. There are 2 options: 1. set up a multisite and create one site for each of your existing language, each with its domain, and install WPML only on the site you want to use the language directory.

2. create a WordPress install within the main site and install WPML in there. You'll end having 2 sites, one yourdomain.com where the other languages are for example yourdomain.it and yourdomain.es and one yourdomain.com/fr (fr will be the name where you install a new WordPress instance) with languages for example yourdomain.com/de and yourdomain.com/ru

Tagged: 

This topic contains 8 replies, has 3 voices.

Last updated by Jose Luis 11 months, 1 week ago.

Assigned support staff: Laura.

Author Posts
November 7, 2018 at 7:52 pm #2886990

thomasW-62

Hi,

how can I use different languages in different domains and directories? 3 Sites for 3 languages already exist. And the other three languages should be integrated into one site in different directories. How can I do this?

Regards
Sascha

November 9, 2018 at 2:08 pm #2893527

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi Sascha,

thanks for contacting us.

At the moment, it' not possible to do what you want. You can't have both language domain and directory on the same WordPress install.

I think you have 2 alternatives:

1. set up a multisite and create one site for each of your existing language, each with its domain, and install WPML only on the site you want to use the language directory.

2. create a WordPress install within the main site and install WPML in there. You'll end having 2 sites, one yourdomain.com where the other languages are for example yourdomain.it and yourdomain.es and one yourdomain.com/fr (fr will be the name where you install a new WordPress instance) with languages for example yourdomain.com/de and yourdomain.com/ru

Let me know if this helps you or if you need further assistance.

November 9, 2018 at 3:48 pm #2893915

thomasW-62

Hi Laura,

thanks for your reply. Your solution would be my solution, too. But therefor I have to have all of them in the language menu. Is it possible to add some own code (links) into the language menu?

Thanks for your help. Regards
Sascha

November 9, 2018 at 4:07 pm #2893940

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi Sascha,

I think it should be possible, but you'll need a custom language switcher. You can see our documentation for it:
https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/
https://wpml.org/documentation/getting-started-guide/language-setup/designing-custom-language-switchers-using-template-files/

Unfortunately, we cannot provide support for this kind of custom code. If you need help with it, you can consider one of our WPML contractors: https://wpml.org/contractors/

Let me know if this helps you or if you need further assistance.

November 14, 2018 at 12:52 pm #2906379

thomasW-62

Hi Laura,

thanks for the Links. I could use them to build my own language switcher. (I don't want to.) Is it possible to insert a new language into the original switcher by code? The examples only describe hot to get the language list, but not how to set it. Is their a way for this?

Regards
Sascha

November 14, 2018 at 2:06 pm #2906712

Laura
Supporter

Languages: English (English ) Italian (Italiano ) Portuguese (Brazil) (Português )

Timezone: Europe/Rome (GMT+02:00)

Hi,

you could try with this hook for example: https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/#hook-662213

Also check this page: https://wpml.org/documentation/support/wpml-coding-api/

However, if you want to change the default language switcher you risk to broke the plugin, and that your files are overwritten with each update so I'm not sure this is the best solution.

November 14, 2018 at 2:10 pm #2906733

thomasW-62

Hi,

I found a realy easy solution. I use a 301 redirect. I redirect the language folder to the language domain. Thanks for your help.

Regards
Sascha

November 14, 2018 at 2:10 pm #2906736

thomasW-62

My issue is resolved now. Thank you!

July 18, 2019 at 7:55 pm #4242123

Jose Luis

I have a similar issue to this and after hours of errors I am discovering this post.
My second language images don't show on the back and my translation plugin config page returns a 404.

Can you please reconfirm that this setup for two languages is not possible under WPML?

my.domain.es/blog/ --- > main WP configuration site (spanish)
my.domain.com/blog/ --> second language

If that is the case I find this a major limitation that other multilingual plugins like polylang do not have. Thanks.

OPENED a new ticket as per your indications!