Title: Custom Select Button
Last modified: November 21, 2021

---

# Custom Select Button

 *  Resolved [iakbar](https://wordpress.org/support/users/iakbar/)
 * (@iakbar)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/custom-select-button/)
 * Hey, I wanted to create a primary select button to switch between the languages,
   but in my current setup, I am not using the sub-directives for my default language.
   Also, the slugs are getting auto-translated for my second language but not working
   in vice-versa.
 * How can I get the valid respective page link just like the language switcher 
   for this select button?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Support [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * (@alexcozmoslabs)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/custom-select-button/#post-15099847)
 * 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 ](https://example.com/en/page/) [ French ](https://example.com/fr/page/))
 * 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 on how to build a language switcher.
 * **_— Also, the slugs are getting auto-translated for my second language but not
   working in vice-versa._**
    The translation happens directional only from default
   language to additional ones.
 *  Plugin Support [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * (@alexcozmoslabs)
 * [4 years, 5 months ago](https://wordpress.org/support/topic/custom-select-button/#post-15124163)
 * Since more than 5 days have passed since you received instructions about the 
   opened topic, and you did not return with an update, we will mark this ticket
   as successfully resolved.
    If you have other questions regarding TranslatePress,
   we recommend you create another ticket.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Custom Select Button’ is closed to new replies.

 * ![](https://ps.w.org/translatepress-multilingual/assets/icon.svg?rev=3166541)
 * [TranslatePress - Translate Multilingual sites with AI Translation](https://wordpress.org/plugins/translatepress-multilingual/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/translatepress-multilingual/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/translatepress-multilingual/)
 * [Active Topics](https://wordpress.org/support/plugin/translatepress-multilingual/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/translatepress-multilingual/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/translatepress-multilingual/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * Last activity: [4 years, 5 months ago](https://wordpress.org/support/topic/custom-select-button/#post-15124163)
 * Status: resolved