Source: https://wpml.org/forums/topic/languages-switcher-shortcode-changed-in-translations/
- The shortcode [wpml_language_selector_widget] is used to display the language switcher.
- If the website is translated by someone with the WordPress ‘subscriber’ user role, that shortcode is changed to [wpml_disabled_selector_widget]
- The language switcher doesn’t show
This is intentional. If a user does not have the ability to use a short code or the capability “unfiltered_html” then it will replace the shortcode.
Workaround
Add the following constant to wp-config.php
/** Make sure WPML keeps shortcodes as is, even for WP users roles without unfiltered_html capabilities */
define('WPML_TRANSLATOR_CAN_USE_LS_SHORTCODE', 'true');Code language: PHP (php)