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

Last updated by Raja Mohammed 3 months ago.

Assigned support staff: Raja Mohammed.

Author Posts
July 11, 2019 at 11:40 am #4189391

marnixF

Hello,

I've 3 languages installed on my site, NL, DE and ENG. For other languages I only want to create a landingpage. The landingpage is a copy of the homepage. The landingpages will be translated into the other languages like Italian, Spanish, Polish, etc.

It is quit easy to do with the translation editor of WPML. But, when the homepage is translated into an other language, the language is poping up in in the language switcher in the topmenu.

Is it possible to create other homepage versions in other languages without the fact that those languages will be visible in the language switcher?

I've several URL domains, like hidden link or hidden link and I want to accomplish that visitors who visit hidden link sees the Italian Landingpage version of the homepage.
But the Italian option should not be visible in the language switcher.

I hope, it is clear why I try to accomplish.
If you need more info, please let me know.

King regards,
Marnix

July 11, 2019 at 1:30 pm #4190195

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi marnix,

I will help you with your issue.

I'm trying to get this straight, It seems you want the language in which the site is rendered should be removed from the language switcher for eg, visiting Italian version of the site should not display the italian flag in the language, correct me if I am wrong.

This is possible only when you display the language as "List of language" in the Language switcher edit screen. If you are displaying the languages as Dropdown menu then the currently selected language will be displayed on top of the dropdown list.

To change the Language switcher style
- Goto WPML > Language > Menu language switcher
- Click on the pencil icon to edit the Language switcher settings
- Under the "Language menu items style:" Select the option "List of languages"
- The option will allow you to deselect Current language from the language switcher

You can use some custom CSS to change the Horizontal list of languages to a dropdown list

I hope this helps you better, Let me know if your is something different, In case if you need further assistance feel free to write back.

Kind regards
Raja

July 11, 2019 at 1:59 pm #4190545

marnixF

Hi Raja,

Thanks for your quick response!

The answer is not quit what I'm looking for.

Maybe I didn't describe it well...

I've 3 main languages, DE, NL and ENG on my site with a lot of webpages. Only the homepage will be translated into other languages like Italian, Spanisch, etc.

But when the home page is translated into eg Italian, immediately the Italian option is available in the language switcher.

So with only the home page translated into Italian and a visitor is on the DE homepage, he/she can go/select the Italian version of the home page in the language switcher.

I only would like to see DE, ENG and NL in the language switcher and not the Italian option.
I knwo I can unable the language in the back-end of WPML, but than the Italian version of the homepage is not live anymore.

kind regards,
marnix

July 12, 2019 at 11:08 am #4197971

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Marmix,

I beg your pardon, I have misinterpreted your request.

- You can create a Custom language switcher, However, this requires coding skills. This will give you great control over language switcher since this is the custom code you can add a various condition to enable and disable Languages dsiplayed to the user.

Please refer to the detailed documentation: https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/

I hope this helps you better.

Kind regards
Raja

July 18, 2019 at 2:16 pm #4239547

marnixF

Hi Raja,

My PHP coding skills aren't that great, so I've asked a PHP tech guy to help me. But he is running into problems because 'sitepress' is blocking everything.

Is there no other way to remove a language in the menu? It seems such a simple question...

Kind regards,
Marnix

July 19, 2019 at 5:36 am #4244051

Raja Mohammed
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi Marnix,

The request to remove language on selective pages requires conditions to be applied in the coding which is only possible using custom language switcher.

I am not clear about the method the developer is using to handle this request, However, As I have suggested in my earlier response it will be very much handy to handle the languages in custom language switcher than to work on the default language switcher.

Detailed documentation about custom language switcher: https://wpml.org/documentation/getting-started-guide/language-setup/custom-language-switcher/

Since this is custom work which is beyond our support capability I am providing you with available resources and possible ways to achieve your request

Kind regards
Raja