Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,

    Most times, it may be enough to just modify the CSS by adding additional rules to either the Floating language switcher or the Shortcode language switcher.

    If you are looking for more radical changes, you can create your own language switcher using our code as an example.

    Basically, the language switcher consists of a series of anchor tags with href attributes pointing to the equivalent page in different languages.
    It’s important to use anchor tags if you are planning to use the Automatic User Language Detection Add-on.

    (
    English French
    )

    You can find the code for the already built language switchers here:

    1. Floater language switcher
    wp-content/plugins/translatepress/includes/class-language-switcher.php (function add_floater_language_switcher)
    wp-content/plugins/translatepress/assets/css/trp-floater-language-switcher.css

    ?2. Shortcode language switcher [language_switcher]
    wp-content/plugins/translatepress/includes/class-language-switcher.php ( function language_switcher )
    wp-content/plugins/translatepress/partials/language-switcher-shortcode.php
    wp-content/plugins/translatepress/assets/css/trp-language-switcher.css

    Use the code as an example of how to build a language switcher.

    Cheers,

    Thread Starter ueligygerch

    (@ueligygerch)

    With CSS I can edit the Short Code Widget of Elementor. Does someone like me know the rules for the flag (size!) And the border?

    You can see what I mean here:

    https://xd.adobe.com/view/b31d87d0-0957-4f50-a213-f05923072023-e64e/?fullscreen

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Language Trigger’ is closed to new replies.