Skip Navigation

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

Problem:
The client needed help with two issues: translating the "CVV" field in WooCommerce checkout for Arabic and Chinese languages, and customizing the language switcher to abbreviate language names and add separators.
Solution:
For abbreviating the language names in the language switcher, we recommended the client to navigate to WPML->Languages->Edit Languages and adjust the names accordingly. For adding a separator in the language switcher, we provided the following CSS code:

.wpml-ls-item {<br />position: relative;<br />}<br /><br />li.wpml-ls-item::after {<br />content: "|";<br />position: absolute !important;<br />right: 0px;<br />top: 2px;<br />color: #ffffff;<br />}<br /><br />li.wpml-ls-item:last-child:after {<br />content: "";<br />}

If this solution does not resolve your issue or seems outdated, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please open a new support ticket at WPML support forum.

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.

Tagged: 

This topic contains 3 replies, has 2 voices.

Last updated by john-robinA 9 months ago.

Assisted by: Bobby.

Author Posts
September 20, 2024 at 8:50 pm #16204133

john-robinA

Hi! Most of the texts are now translated in arabic and chinese language except for "CVV" in woocommerce checkout field editor.

Other than that, Would it be possible to shorten the texts for the language switcher?
Example:

Arabic = AR
English = EN
Simplified Chinese = ZH

Output: AR / ZH / EN

September 20, 2024 at 8:51 pm #16204135

Bobby
WPML Supporter since 04/2015

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi there,

To abbreviate the language names please go to WPML->languages->edit languages and adjust the names then save.

Let me know your results, please.

September 22, 2024 at 2:15 pm #16206275

john-robinA

Hello! Thank you! I was able to abbreviate the language name. However, would it be possible for you to provide some CSS that could help me add a separator for the language switcher?

lang-switcher.png
September 22, 2024 at 3:06 pm #16206360

john-robinA

Hi! I resolved my issue. Thank you so much for your help!

I used this code:

/* separator pipe*/
.wpml-ls-item {
position: relative;
}

li.wpml-ls-item::after {
content: "|";
position: absolute !important;
right: 0px;
top: 2px;
color: #ffffff;
}

li.wpml-ls-item:last-child:after {
content: "";
}