Skip to content Skip to sidebar

This topic contains 0 reply, has 0 voices.

Last updated by robertL-58 5 months, 3 weeks ago.

Assisted by: Itamar.

Author Posts
November 19, 2025 at 3:57 pm #17592612

robertL-58

Background of the issue:
I am trying to replace the Twig code as I can see there is a post stating that Twig template support has been dropped, but there is still documentation on the site for Twig. I have replaced the Twig code with CSS so that the language switcher resembles the previous implementation using the Shortcode above. Here is the link to the documentation: https://wpml.org/documentation/support/wpml-coding-api/shortcodes/. The code I am working with is: [wpml_language_switcher] {% for code, language in languages %} {% if language.is_current %} {{ language.native_name }}: Currently Selected"{{ language.code|upper }} {% else %} {{ language.code|upper }} {% endif %} {% endfor %} [/wpml_language_switcher].

Symptoms:
The active language still remains targetable via focus, which is an issue for users accessing the site with a screen reader.

Questions:
Do you have an alternative method of implementation for your Twig Shortcode example?
Is there any solution you can provide for the issue with the active language being targetable via focus?