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: Documentation request
This topic contains 10 replies, has 2 voices.
Last updated by Bobby 1 year, 9 months ago.
Assisted by: Bobby.
Author | Posts |
---|---|
September 29, 2023 at 11:32 pm #14490337 | |
moazH |
Hi there, The currency switcher is showing the currencies in Arabic language even if the website language is switched to english, It must only show SAR if english and ر.س if Arabic "for example" hidden link |
October 2, 2023 at 7:05 pm #14500277 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Please go to WooCommerce->WooCommerce Multilingual->Multi-Currency and edit the currency switcher. There you will be able to edit what displays -- to improve the way it displays, likely remove "%name% (%symbol%) -" and leave only %code% "%name% – full name of the currency, for example “Euro” |
October 4, 2023 at 9:10 pm #14515683 | |
moazH |
I have already edited the currency switcher widget but I can not edit the price view in the products as I mentioned before, It's displaying ر.س while I am on the english language |
October 4, 2023 at 9:14 pm #14515713 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
I would like to request temporary access (wp-admin and FTP) to your site to test the issue. **Before we proceed It is necessary to take FULL BACKUP of your database and your website. Providing us with access, you agree that a backup has been taken ** I often use the Duplicator plugin for this purpose: http://wordpress.org/plugins/duplicator/ NOTE: If access to the live site is not possible and the staging site does not exist please provide me with a duplicator package created with the duplicator plugin. Thank you, |
October 4, 2023 at 9:44 pm #14515809 | |
moazH |
Access Granted |
October 5, 2023 at 7:19 pm #14523017 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Hello, The access granted in the other thread we are working on is no longer working for our team. |
October 5, 2023 at 8:28 pm #14523141 | |
moazH |
sorry, I didn't get your point ! |
October 6, 2023 at 12:02 am #14523511 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
You mentioned "Acceess Granted", however, we have no access to the backend. I have re-enabled the private field reply. Please share with me access to further review this issue so we can provide the best solution possible. |
October 6, 2023 at 5:57 pm #14530663 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Thank you! Reviewing this everything looks correct, the reason the currency symbol is not changing is that it's directly controlled by WooCommerce and not WPML, therefore it cannot be translated using WPML String Translation. You can, however, add the translation by using the following workaround provided by my colleague. Let me know your results, please. |
October 8, 2023 at 4:48 pm #14535143 | |
moazH |
add_filter('woocommerce_currency_symbol', 'change_existing_currency_symbol', 10, 2); function change_existing_currency_symbol( $currency_symbol, $currency ) { ----------------------------------------- |
October 9, 2023 at 9:14 pm #14542661 | |
Bobby WPML Supporter since 04/2015
Languages: English (English ) Timezone: America/Los_Angeles (GMT-07:00) |
Thank you for updating me! You can try adding 2 more cases for the rest of the currencies See this for example: function change_existing_currency_symbol( $currency_symbol, $currency ) { switch( $currency ) { case 'SAR': if(ICL_LANGUAGE_CODE=='en'){ $currency_symbol = 'SAR'; }else{ $currency_symbol = 'ر.س'; } break; case 'EUR': if(ICL_LANGUAGE_CODE=='en'){ $currency_symbol = 'SAR'; }else{ $currency_symbol = 'ر.س'; } break; case 'GBP': if(ICL_LANGUAGE_CODE=='en'){ $currency_symbol = 'SAR'; }else{ $currency_symbol = 'ر.س'; } break; } return $currency_symbol; } Make sure to replace the case 'EUR' and case 'GBP' with the correct ones along with the language code and symbols Let me know your results, please. |