Skip Navigation

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.

Our next available supporter will start replying to tickets in about 3.57 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 6 replies, has 2 voices.

Last updated by Kor 3 days, 5 hours ago.

Assisted by: Kor.

Author Posts
September 24, 2024 at 2:12 pm #16215420

Alessandro

Background of the issue:
I am trying to translate a few links that have an icon in front added with the a::before selector. However, when I translate it into Japanese and Thai languages, the pseudo element is wrapped in a separate anchor tag resulting in something like iconlink rather than iconlink. (hidden link)

Symptoms:
The pseudo element is wrapped in a separate anchor tag instead of being part of the same anchor tag as the link.

Questions:
Why is the pseudo element being wrapped in a separate anchor tag when translating into Japanese and Thai?
How can I ensure the icon remains part of the same anchor tag as the link after translation?

September 24, 2024 at 2:34 pm #16215617

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Here is the login URL hidden link to the sandbox site.

Please create a test page and try to replicate the issue over there. Let me know how it goes.

September 24, 2024 at 3:18 pm #16215975

Alessandro

I just replicated the proble in the test page in japanese language

Screenshot 2024-09-24 at 17.18.07.png
September 25, 2024 at 4:02 pm #16221839

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience. I have escalated this to our 2nd Tier Support and I will come back to you once I've feedback.

September 26, 2024 at 1:01 pm #16225319

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

thanks for your patience.

Our 2nd Tier Support checked and it works fine when he switched themes as shown here hidden link . He suspected theme related issue and could you share your theme files here so that we could check? You can upload it to Google Drive and share the link with us.

September 26, 2024 at 3:44 pm #16226358

Alessandro

Apologies if that wasn't clear, switching theme solved the issue because it was missing this piece of css which I added to the theme first installed:

ul.wp-block-list {
padding-inline-start: 0;
list-style-type: none;
align-content: center;
}

ul.wp-block-list li a {
display: flex;
align-items: center;
}

ul.wp-block-list li a::before {
content: "\f105";
font-family: 'FontAwesome';
margin-right: 0.3em;
display: inline-block;
}

I know that FOntAwesome is not installed but that is not relevant. THe main point is that adding anything to the anchor tag with ::before cause the wpml plugin to treat it as another anchor.

I hope this is more clear. Attached the image.

Screenshot 2024-09-26 at 17.43.56.png
September 26, 2024 at 3:50 pm #16226377

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply. I get it now and I've forwarded your feedback to our 2nd Tier Support.