Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client wants to add a separator between language switcher items.

Solution:
Here is the solution:
https://wpml.org/forums/topic/separator-between-language-switcher/#post-12002871

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 5 replies, has 2 voices.

Last updated by MOOI 1 year, 7 months ago.

Assisted by: Noman.

Author Posts
September 7, 2022 at 7:40 am #12002479

MOOI

Tell us what you are trying to do?
I would like to add separator like this: hidden link

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
hidden link

September 7, 2022 at 8:31 am #12002871

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting WPML Support. You can achieve it by using the below CSS in custom CSS section of your theme:

.wpml-ls-item {
	position:relative;
}

.wpml-ls-item::after {
    content: "/";
    position: absolute !important;
    right: -7px !important;
    top: 36px !important;
    color: #fff;
}

.wpml-ls-item + .wpml-ls-item::after {
	content: '';
}

And it will look as in the attached screenshot.

Here is another ticket with similar issue:
https://wpml.org/forums/topic/adding-a-separator-in-the-language-switcher/#post-10129909

Please let me know if this resolves your issue or if you need further assistance with this issue.

Thank you

switcher sep.png
September 7, 2022 at 8:40 am #12002987

MOOI

Hi Noman,

Perfect. Thanks a lot for the prompt and professional support 🙂
My issue is resolved now. Thank you!

September 7, 2022 at 8:48 am #12003043

MOOI

sorry Noman, just a follow-up question:
Do you think we can achieve the same in the mobile menu too: hidden link

September 7, 2022 at 12:29 pm #12005481

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Yes, you can achieve it on the mobile menu by using the below CSS:

@media(max-width:992px){
.wpml-ls-item {
	width: auto !important;
	margin-right: 15px !important;
}

.menu-item.wpml-ls-item::after {
	color:#000 !important;
	top: 25px !important;
	right:0 !important;
	left: 30px !important;
}
}

And it will look as in the attached screenshot.

Please understand that I'm helping you here with an issue that is out of the scope of our support forum and we will not be able to support the fix that we give you in the future. Because the theme or our code might have changed, so please always be aware of this. Right now it's working without any issue.

Thank you

mobile switcher 1.png
September 7, 2022 at 6:51 pm #12008169

MOOI

My issue is resolved now. Thank you Noman. 🙂

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.