Title: Language Permalink / Custom Language Dropdown
Last modified: June 8, 2018

---

# Language Permalink / Custom Language Dropdown

 *  [AvWijk](https://wordpress.org/support/users/avwijk/)
 * (@avwijk)
 * [8 years ago](https://wordpress.org/support/topic/language-permalink-custom-language-dropdown/)
 * Hello,
 * I created a custom Bootstrap language picker, because I did’t like the default
   dropdown and I couldn’t figure out how to place my SVG flag images. Only problem
   is that I cannot get the permalink working and stuck with a static one to the
   homepage?
 *     ```
       <?php if (get_locale() == 'en_US') {?>
   
                  						 <!--- EN -->
       								 <?php // echo get_locale(); ?>
                  						 <div class="langchooser btn-group">
                                                             <button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                               <img src="<?php echo esc_url( get_template_directory_uri());?>/assets/img/english.svg" class="img-responsive" alt="English"> <span class="caret"></span>
                                                             </button>
                                                 <ul class="dropdown-menu">
                                                    <li><a href="<?php echo 'https://www.bla.com/nl' // dutch ?>">  <img src="<?php echo esc_url( get_template_directory_uri());?>/assets/img/dutch.svg" class="img-responsive" alt="Nederlands"></a></li>
                                                 </ul>
                                  		 </div>
   
       <?php }else{ ?>
   
       							       <!--- NL -->
       							          <?php // echo get_locale(); ?>
       								  <div class="langchooser btn-group">
                                                             <button class="btn btn-default btn-sm dropdown-toggle" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                                               <img src="<?php echo esc_url( get_template_directory_uri());?>/assets/img/dutch.svg" class="img-responsive" alt="Nederlands"> <span class="caret"></span>
                                                             </button>
                                                 <ul class="dropdown-menu">
                                                    <li><a href="<?php echo 'https://www.bla.com/' // english ?>">  <img src="<?php echo esc_url( get_template_directory_uri());?>/assets/img/english.svg" class="img-responsive" alt="English"></a></li>
                                                 </ul>
                                  		 </div>        
   
   
   
   
        <?php } ?>
       ```
   

The topic ‘Language Permalink / Custom Language Dropdown’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/qtranslate-x_f9f9f9.svg)
 * [qTranslate X](https://wordpress.org/plugins/qtranslate-x/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/qtranslate-x/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/qtranslate-x/)
 * [Active Topics](https://wordpress.org/support/plugin/qtranslate-x/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/qtranslate-x/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/qtranslate-x/reviews/)

## Tags

 * [chooser](https://wordpress.org/support/topic-tag/chooser/)
 * [dropdown](https://wordpress.org/support/topic-tag/dropdown/)
 * [permalink](https://wordpress.org/support/topic-tag/permalink/)

 * 0 replies
 * 1 participant
 * Last reply from: [AvWijk](https://wordpress.org/support/users/avwijk/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/language-permalink-custom-language-dropdown/)
 * Status: not resolved