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

Last updated by Rajeeb Banstola 3 months, 1 week ago.

Assigned support staff: Rajeeb Banstola.

Author Posts
July 9, 2019 at 7:58 pm #4174183

markD-33

Hi,

This website i'm working on (dev: hidden link) uses Ajax for naviguation and the language switcher always brings me back to the last page I refreshed to, not the last page Ajax called. Is there something I can do to tell the language switcher what the current page is?

Thank you.

July 9, 2019 at 10:28 pm #4174643

Rajeeb Banstola

Hi,

Thank you for contacting WPML!

I reviewed your site and problem here seems to be the fact that when AJAX loads content, the menu remains unchanged.

You will need to create a new function to call the menu via AJAX as well. When the page opens in the secondary language, you will need to call this second function to load the menu as well.

Unfortunately, this will require custom code is outside the scope of our support.

You can find the list of available hooks that help in the development of this feature here:

https://wpml.org/documentation/support/wpml-coding-api/wpml-hooks-reference/

If you are looking for someone proficient with WPML and custom development, I suggest you to look at WPML contractors here:

https://wpml.org/contractors/

Let me know if you require any other help!

Best,