• Resolved websiteseba

    (@websiteseba)


    I want to create my own translate button. When I want to translate to English it’s just /en/ URL. But how to stay on the same page and come back to default language?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter websiteseba

    (@websiteseba)

    Or how to make shortcode button transparent?

    Greetings,

    Thanks for reaching out.

    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.

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

    ?1.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.

    After this most of the changes that you desire can be achieved by targeting the [language switcher] with custom css.

    Regards

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to make my own Translate Button’ is closed to new replies.