Skip Navigation

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

Problem:
You are using the WPML plugin with Age Gate v3.6.0 and want to add a language switch button to the age gate pop-up. You are unsure if the language switch is automatically shown based on the user's system language setup or if you need to add a switch button manually.
Solution:
The Age Gate plugin may not include built-in support for WPML’s language switcher inside the pop-up. Adding a standard language switcher there likely isn’t possible out of the box. We recommend trying to add a WPML language switcher manually using the shortcode method, as outlined in our documentation: Adding Language Switchers using PHP and Shortcodes.
However, because the Age Gate is a pop-up (not a regular post or page), WPML may not recognize the context properly, meaning the shortcode might not render as expected.
As a fallback, you can manually insert links to your other language versions inside the pop-up, like so:

<a href="https://yoursite.com/en">English</a> | <a href="https://yoursite.com/fr">Français</a>

This won't offer the full WPML switcher functionality (like flags or dropdowns), but it does provide users a way to switch languages.

If this solution does not apply to your case, or if it seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If you still need assistance, please open a new support ticket at WPML support forum.

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 0 voices.

Last updated by Bruno Kos 1 month, 3 weeks ago.

Assisted by: Bruno Kos.

Author Posts
April 16, 2025 at 6:29 am #16936769

ondrejK-10

Background of the issue:
I am using the WPML plugin with Age Gate v3.6.0 on a site under development. I want to add a language switch button to the age gate pop-up.

Symptoms:
I am unsure if the language switch is automatically shown based on the user's system language setup or if I need to add a switch button manually.

Questions:
Is there a way to add a language switch button to the age gate pop-up?
Does the age gate pop-up automatically show the language based on the user's system language setup?

April 16, 2025 at 2:15 pm #16939385

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

I am not sure if the Age Gate plugin includes built-in support for WPML’s language switcher inside the pop-up, so adding a standard language switcher there likely isn’t possible out of the box.

That said, you could try adding a WPML language switcher manually using shortcode method, as outlined here:
https://wpml.org/documentation/getting-started-guide/language-setup/language-switcher-options/adding-language-switchers-using-php-and-shortcodes/#language-switcher-shortcodes

However, because the Age Gate is a pop-up (not a regular post or page), WPML may not recognize the context properly — meaning the shortcode might not render as expected.

As a fallback, you can manually insert links to your other language versions inside the pop-up, like so:

<a href="<em><u>hidden link</u></em>">English</a> | 
<a href="<em><u>hidden link</u></em>">Français</a>

This won't offer the full WPML switcher functionality (like flags or dropdowns), but it does provide users a way to switch languages.