[Resolved] د.إ SHOWING INSTEAD OF AED when website is english
This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing issues with currency symbols not displaying correctly on their multilingual WooCommerce site. They have to manually add code to their functions.php file to switch currency symbols between English and Arabic, depending on the current language. Despite using WPML's String Translation for the currency, the Arabic currency symbol disappears or does not display correctly when the site language is switched.
Solution: 1. Understand that WPML does not control how WooCommerce displays or formats currency symbols. The issue arises from the custom code used to switch currency symbols based on the site's current language. 2. Remove any currency symbol translations from WPML String Translation to avoid conflicts, as these symbols are fixed and do not require translation. 3. Ensure that the custom filter code is correctly implemented to change the currency symbol based on the current language. This code is necessary because WooCommerce does not automatically adjust currency symbols based on WPML's language settings.
If this solution does not resolve your issue or seems outdated, we recommend opening a new support ticket. We also 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. For further assistance, please visit our support forum at https://wpml.org/forums/.
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.
each time aech time i have to access cpanel and function.php server to write a script and fix the currency symbol, cant WPML fix it once and for all please??
Please note that currency display and formatting are controlled by WooCommerce, not by WPML. WPML does not modify or control how currencies such as AED are displayed on the site nor how they are created.
From what I can see, it appears you may be using custom code to adjust the currency display. If that custom code is not working as expected, I would recommend checking it further with the developer.
If there is anything related specifically to WPML functionality or translation or you having some issue with WPML that we can help with, please let us know and we will be glad to assist.
But when I translated AED currency to arabic here: hidden link in string translation in WPML, the arabic currency disappeared, and it's not showing no in the arabic website here: hidden link + in WooCommerce ==>settings-->payments or general here: hidden link the 2 symbols of AED are showing properly in WooCommerce settings, so this is not a WooCommerce issue i believe.
i had a different ticket already a year ago here: https://wpml.org/forums/topic/currency-language-2/ for the same purpose, but the answer has been removed from my ticket. I don't know why, it's there already. It was there, but someone from WPML removed the support and reply from the admin!!!!
HEY ANDREA, thanks for your reply, the necessary done now and the problem has been fixed. YOU MADE MY DAY after all this wait, thank you so much i really appreciate it, but the problem now is that if i dont add the below script to my cPanel FTP server files:
function change_existing_currency_symbol($currency_symbol, $currency)
{
switch ($currency) {
case "AED":
if (ICL_LANGUAGE_CODE == "en") {
$currency_symbol = __("AED", "elfpublishing");
} else {
$currency_symbol = __("د.إ", "elfpublishing");
}
break;
}
return $currency_symbol;
Arabic currency will appear again when the website is in English
And if the website is arabic its fine, no issue, but the English currency AED is not showing anymore, how can we fix this with WPML once and for all? let me know please