Title: Problem in mobile device
Last modified: September 16, 2024

---

# Problem in mobile device

 *  Resolved [Archie Plugins](https://wordpress.org/support/users/archieplugins/)
 * (@archieplugins)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/)
 * Hello everyone. I have creaed a website and I am using your plugin. I have created
   a custom shortcode to create language switcher and use it in elementor menus.
 * At desktop it works really well but when in mobile it does not work for every
   link.
 * The code I have in the functions.php follows:
 *     ```wp-block-code
       add_shortcode('lang_link', 'trpc_custom_language_switcher_link', 10);function trpc_custom_language_switcher_link(){      if ( apply_filters( 'trp_allow_tp_to_run', true ) ){        $languages = trp_custom_language_switcher();       $html = '';         $current_language = get_locale();        foreach ($languages as $name => $item) {                                                      if($item['language_code'] == $current_language){continue;}                        if($current_language == 'el'){                $html .= $item['current_page_url'];            }else{                                 $cur = $item['current_page_url'];                                    $html .= trpc_get_url_for_language('el',$cur);                                           }                                }              return $html;    }}function strip_language_code($url, $language_code) {    // Construct the pattern to match the language code    $pattern = "/\/" . preg_quote($language_code, '/') . "\//";    // Use preg_replace to remove the language code    $cleaned_url = preg_replace($pattern, '/', $url);    return $cleaned_url;}function trpc_get_url_for_language($lang = null, $url = null) {	if ( ! class_exists('TRP_Translate_Press') )		return $url;	$trp           = TRP_Translate_Press::get_trp_instance();	$url_converter = $trp->get_component( 'url_converter' );	return esc_url( $url_converter->get_url_for_language( $lang, $url, '' ) );}
       ```
   
 * I use the langlink shortcode .When in mobile and when in greek everything works
   but when I visit the place in english the “EL” link does not work. Can you please
   help me?
 * Thanks in advance

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

 *  Plugin Support [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * (@alexcozmoslabs)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/#post-18020256)
 * Hello,
   Could you please provide some additional information to help us understand
   the issue better and consequently resolve it?
 * Kindly share the exact URL you end up on when you click the “EL” link in English
   on a mobile device. If possible, could you also provide some screenshots demonstrating
   the issue? This would be very helpful as it would give us a clearer idea of what
   is happening.
   Best Regards,
 *  Thread Starter [Archie Plugins](https://wordpress.org/support/users/archieplugins/)
 * (@archieplugins)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/#post-18022192)
 * Hello .
 * The website is the following [https://thermaspalesvos.com/](https://thermaspalesvos.com/)
   and if you browse it via a mobile device you will notice that the EL / EN on 
   the mobile popup menu it does not work properly but the desktop version- which
   is the same shortcode (custom one) works great.
 *  Plugin Support [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * (@alexcozmoslabs)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/#post-18033355)
 * Hi,
 * You have a custom language switcher made with Elementor on your website. We suggest
   using one of our pre defined switchers as we are not offering support for debugging
   custom ones, except the doc page, [https://translatepress.com/docs/developers/custom-language-switcher/](https://translatepress.com/docs/developers/custom-language-switcher/),
   where we try to guide the client though the process of making a custom language
   switcher.
   Kind Regards,
    -  This reply was modified 1 year, 8 months ago by [Alex](https://wordpress.org/support/users/alexcozmoslabs/).
 *  Thread Starter [Archie Plugins](https://wordpress.org/support/users/archieplugins/)
 * (@archieplugins)
 * [1 year, 8 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/#post-18034249)
 * Dear [@alexcozmoslabs](https://wordpress.org/support/users/alexcozmoslabs/) I
   have used your code to create just a custom lang switcher I am using it with 
   a shortcode via the elementor , but elementor does not interfere. I think that
   some other users have the same issue only when in mobile. At desktop screens 
   everything runs smoothly.
 *  Plugin Support [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * (@alexcozmoslabs)
 * [1 year, 7 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/#post-18085462)
 * Hi,
   Please try including it though a Text Elementor block instead. See if that
   helps.

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

The topic ‘Problem in mobile device’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Alex](https://wordpress.org/support/users/alexcozmoslabs/)
 * Last activity: [1 year, 7 months ago](https://wordpress.org/support/topic/problem-in-mobile-device/#post-18085462)
 * Status: resolved