This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 9 replies, has 2 voices.

Last updated by Diego Pereira 5 months, 2 weeks ago.

Assigned support staff: Diego Pereira.

Author Posts
April 30, 2019 at 5:09 am #3707879

doronY

I had a ticket about this issue but its closed now and the issue is not resolved yet

April 30, 2019 at 5:46 pm #3713959

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hello @dorony, welcome to the WPML support Forum!

Is this the ticket? https://wpml.org/forums/topic/switcher-issues-on-mobile/

Could you send us more details on why the solution provided not worked? I will take a look.

All the best,
Diego

April 30, 2019 at 6:26 pm #3714277

doronY

Hi Diego
Yes, this is the ticket,
I'm not happy with the code added to my site and I don't think it is a real solution for the problem, I really appreciate your help
Doron

May 1, 2019 at 5:58 pm #3719329

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Thanks. I checked the other ticket. You said that the language switcher not worked because:

"1. It doesn't look like the regular switcher
2. It doesn't work on a tablet device"

I did some small improvements to the CSS code to make it work on tablets and match the style of the menu on mobile. You can add the following code to Appearance > Customize > Additional CSS. The language switcher should look like the screenshot.


@media only screen and (max-width: 768px) {
  .wpml-ls-sub-menu {
  position: relative !important;
  top: 0 !important;
  visibility: visible !important;
  right: 0 !important;
}

.wpml-ls-statics-shortcode_actions a {
    background-color: transparent !important;
    color: #fff !important;
    border-bottom: 1px dotted #555 !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.wpml-ls-legacy-dropdown-click .wpml-ls-flag {
    display: inline !important;
    vertical-align: middle !important;
    width: 18px !important;
    height: 12px !important;
    margin-left: 7px !important;
}

}

You also sent this link as an example: hidden link - On this example, the do_action code used the render the language switcher, is located outsite the menu. You can try to move the language switcher code to the place you want to display it.

<div class="cus-mobile-menu">
    <?php do_action('wpml_add_language_selector'); ?>
</div>

Please note that customization services are out of scope of our support policy: https://wpml.org/purchase/support-policy/ - If you need to customize it further, we recommend to hire a contractor. We have a list of experienced contractors available here: https://wpml.org/contractors/

Please let me know if it worked for you.

Kind regards,
Diego

May 1, 2019 at 6:17 pm #3719363

doronY

Thanks, Diego
Actually, Noman the support member also did some code changing and I like to delete the changes he did, can I give you credential and you can do it for me, please?
I think it will be faster like this
Thanks again
Doron

May 2, 2019 at 1:21 pm #3724821

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

Sure. Please do a complete backup of the website and send us the WP credentials and FTP using the private field.

Kind regards,
Diego

May 2, 2019 at 1:56 pm #3725159

doronY

Just sent the details

May 3, 2019 at 1:36 pm #3734809

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

You forgot to send the FTP credentials. I tried to remove the code from the inc/basic/header.php file using the WordPress editor but it not worked.

I removed the CSS code then added a new snippet to hide the language switcher as a workaround, but the code is still present on the inc/basic/header.php file (lines 231-233).

Please let me know if it worked for you.

Kind regards,
Diego

May 5, 2019 at 5:43 am #3741799

doronY

Hi
So we back to the beginning, Please try to switch language with TouchScreen (mobile/tablet) and see the problem, when I click the switcher it goes to the same URL, like refreshing the page and I can't choose another language.
Can we do it on chat?

May 6, 2019 at 12:53 pm #3748583

Diego Pereira
Supporter

Languages: English (English ) Spanish (Español ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Hi there,

It seems to occur because of a conflict with the menu of your theme. When we click on the arrow to open the sub-menu it redirect to the link instead of just opening the menu. Please note that this also occurs with other items of the menu on mobile (e.g. "טיולים בירדן ").

The solution in this case is to make the sub-menu always opened on mobile. You can do that with the following CSS:

@media only screen and (max-width: 768px) {
.wpml-ls-item .dropdown-menu {
  float: none;
  position: relative;
  display: block;
  background: transparent;
  color: #ffffff;
}

.wpml-ls-item .dropdown-menu li a {
  color: #ffffff;
}
}

The menu should looks like the screenshot, so you will be able to swtih between languages on mobile.

Please note that customization services are out of scope of our support policy: https://wpml.org/purchase/support-policy/ - If you need to customize it further, we recommend to hire a contractor. We have a list of experienced contractors available here: https://wpml.org/contractors/

Please let me know if it worked for you.

Kind regards,
Diego