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

Last updated by Marcel 4 years, 6 months ago.

Assisted by: Marcel.

Author Posts
November 9, 2020 at 8:36 am #7405955

mohannada-4

I add do_action('wpml_add_language_selector') on my header
its working well on all pages expected the courses page !

course page : the do_action('wpml_add_language_selector') is empty !!!
ex: hidden link
hidden link

other pages : the do_action('wpml_add_language_selector') is working well
ex : hidden link
hidden link

as well if i tried to add current language the url of lang is wrong both contain the /ar
just ot let you know i have disabled the translation of all custom posts

the purpose of its i need to change the visual only in different language and keep content same without any translation

November 9, 2020 at 10:13 am #7406837

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

Thank you for contacting WPML Support.

other pages : the do_action('wpml_add_language_selector') is working well
ex : hidden link

I can't open the example to compare it. Can you please check this? Does the course page have a translation saved with 100%?

Best Regards
Marcel

November 9, 2020 at 12:14 pm #7407975

mohannada-4

I turn it off all the translation just i am using wpml to load .po file for each language !

November 9, 2020 at 12:28 pm #7408095

mohannada-4

As I mentioned i am using the wpml for translation pages po files for that reason i disable translation feature for all other posts and pages !

November 9, 2020 at 1:29 pm #7408587

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

I'm sorry, I don't understand what is the issue then? If you don't want to use a translation plugin on a specific post type (Courses), why the post type should show the language switcher if the translated content does not exist?

Could you please describe your issue more detailed, If I understand something wrong?

Thanks

Best Regards
Marcel

November 9, 2020 at 1:53 pm #7408935

mohannada-4

so the language switcher is activated only if there is translated page or post for the page ?
in my case i need to displayed even if there is no translation !

November 9, 2020 at 1:56 pm #7408951

mohannada-4

may i need to write a function to add flag for each pre defined and add it to my header !

November 9, 2020 at 2:09 pm #7409033

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Thanks for the info.

so the language switcher is activated only if there is translated page or post for the page ?

Yes, but you can try to choose here "Link to home of language for missing translation". Does this make a difference? Doc: https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/#global-language-switcher-options

Or you can handle it as described here: https://wpml.org/forums/topic/show-language-switcher-even-if-post-has-no-translation/#post-1330914

Best Regards
Marcel