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.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 | 9:00 – 18:00 |
- | - | - | - | - | - | - |
Supporter timezone: America/Lima (GMT-05:00)
Tagged: Documentation request
This topic contains 23 replies, has 2 voices.
Last updated by Andreas W. 8 months ago.
Assisted by: Andreas W..
Author | Posts |
---|---|
March 8, 2024 at 11:00 am #15388649 | |
willR-4 |
I am trying to: Set the currency format of a secondary currency (EUR) - see screen shot Link to a page where the issue can be seen: hidden link - see screen shot I expected to see: Currency format of GBP (main currency) Instead, I got: The currency format of EUR is being applied and cannot be changed - see screen shot In summary, the EUR format settings should only be applied to EUR, and not to the site main currency GBP. Instead, the format of EUR is being applied to GBP. In the multicurrency settings page, there isn't a way to specify GBP settings. They must be set on the main WooCommerce Settings 'General' page. But when I change them there, they are not saved, and instead, the EUR values show instead. |
March 8, 2024 at 11:31 am #15388809 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, I can currently only see the active language English and the currency GBP on your website. I would like to offer to have a closer look at the problem and request temporary access (wp-admin / FTP is not mandatory) to the website to investigate this issue further. You can find the required fields below the comment section when you log in to leave the next reply. The information you provide is private, which means only you and I can see and access it. IMPORTANT The private response form looks like this: Next time you reply, click "I still need assistance." Video: Please note that we are obliged to request this information individually on each ticket. We may not access any access information not specifically submitted on this ticket in the private response form. Best regards |
March 12, 2024 at 3:01 pm #15400222 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I went to WPML > String Translation > Translate texts in admin screens. I searched for "currency". I found the string: admin_texts_woocommerce_currency_pos woocommerce_currency_pos The string has the value "left". I added it to String Translation and translated it to "right". Now, when visiting the French website the currency symbol will show up on the right side. |
March 12, 2024 at 4:29 pm #15400718 | |
willR-4 |
Ok, it took some doing but I got it working. I added values for all of the settings input names: woocommerce_price_decimal_sep, woocommerce_price_thousand_sep and woocommerce_currency_pos (changed to right_space). But on the shop page on the French site (hidden link) and product page, it was still showing in the EN format. Then I added a translation for the currency symbol itself (EUR) and only then did it start working as expected. Is this the recommended way to translate currencies? I would have thought the multi-currency plugin would be used for this, but it doesn't work, as I described in my original query. I'm certain the main use case is translating the currency format by language, not setting it per currency. |
March 12, 2024 at 4:57 pm #15400836 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
You changed the translation of the string "left" to "right_space" which is why it no longer works. The string "GPR" should not be translated. |
March 13, 2024 at 10:42 am #15403034 | |
willR-4 |
Now I'm even more confused than when we started. What I'm trying to do: Currencies should display in the format for the language. So if I'm on the default (EN) site, prices should be: £1,234.00. On the French site, currency should be EUR and display in the FR format: 1 234,00 € Note that in France, there is a space after the cents and the € sign, hence the correct value is 'right_space'. Regardless of whether the translation value is 'right' or 'right_space', it doesn't show correctly on the 'FR' site. I changed the settings on the Multi-currency page (hidden link) to only show the desired currency on the site for that language (see screen shot). However, EUR still doesn't display correctly - it's still showing in the EN format, despite adding the translated values for position, decimal_sep and thousand_sep. 1) Shouldn't the currency format selector on the above page be used to set the format for that currency? Why does changing it here override the global values? It seems wrong that I need to go to the WooCom settings page (hidden link), inspect elements to get the select input name, and then use String translation. 2) The bigger problem is that despite adding string translations for these values, I still don't have prices formatted correctly by site language. 3) Ideally, users should be able to choose their currency, despite their language. For example, someone in a European country other than France may want to shop the EN site, but see prices in EUR. With the settings in the screen shot, this isn't possible. So basically, this is still a giant mess. I think there is a major bug in the way the currency format is set on the the above multi-currency page. However, if you can get it working as I've described, then I'm not too bothered about that. |
March 13, 2024 at 12:27 pm #15403840 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Why it is currently not working is kind of unclear to me and I need some more time for investigating the issue. If you want to show GBP only in English and EUR only in French, you need to use the option "Keep". "Location-based" will only work if you use the Geolocation Feature. See screenshot. |
March 13, 2024 at 1:04 pm #15404077 | |
willR-4 |
Ok - no problem if you need more time. The store won't be launching for at least a week or two, so I just need this working before then. Ideally, I'd like to show both currencies in both shops and give the user the choice. I changed the settings as per the screenshot as a temporary solution to try to get the format working. Once the format it set per shop language, then I hope we can enable both currencies in both shops. Thanks! |
March 14, 2024 at 2:20 pm #15410520 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
It appears that this was a memory issue, and I have changed the WP MEMORY LIMIT to 256M inside the wp-config.php file. I further translated: admin_texts_woocommerce_currency woocommerce_currency admin_texts_woocommerce_currency_pos woocommerce_currency_pos admin_texts_woocommerce_price_decimal_sep woocommerce_price_decimal_sep admin_texts_woocommerce_price_thousand_sep woocommerce_price_thousand_sep |
March 14, 2024 at 4:27 pm #15411531 | |
willR-4 |
My apologies - I should have checked that but glad you found the problem. I tested and we're nearly there, but one big problem remains. I added the currency switcher to the top navigation bar. On the EN site, I can toggle between currencies, and they display correctly. On the FR site, Euro displays fine, and in the correct format. However, when you switch to GBP, all prices are zero and in the wrong format, e.g. £0.00. Can you please at look at what's causing this / how to fix? Many thanks for your help so far. |
March 14, 2024 at 4:45 pm #15411563 | |
willR-4 |
I just found one other thing that could be related: the currency selector doesn't stay when navigating between pages on the FR site. For example, on the store page, I change the currency to GBP. Then when I click on a product, the currency has changed back to EUR. Once GBP is selected, it should stay selected. This appears to work correctly on the EN site (once selected, it doesn't change). |
March 14, 2024 at 4:46 pm #15411566 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
It looks as if translating the following string causes an issue: admin_texts_woocommerce_currency woocommerce_currency Please do not translate this string. I will try to recreate this issue on a new test site so that I can escalate it internally. Once I am done with this task, I will reach out to you again. |
March 14, 2024 at 6:40 pm #15411979 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
I was able to recreate the following bug, which now has been escalated internally: What we try to achieve in language selection is: To achieve this we need to translate the following admin strings: admin_texts_woocommerce_currency_pos woocommerce_currency_pos admin_texts_woocommerce_price_decimal_sep woocommerce_price_decimal_sep admin_texts_woocommerce_price_thousand_sep woocommerce_price_thousand_sep Now, if we revise the translated product and compare EUR with GBP we realize that only GBP has the expected format, but EUR uses the WC default format. Once I receive feedback from the second-tier support about this issue, I will be in contact with you again. |
March 14, 2024 at 8:00 pm #15412094 | |
Andreas W. WPML Supporter since 12/2018 Languages: English (English ) Spanish (Español ) German (Deutsch ) Timezone: America/Lima (GMT-05:00) |
Hello, In the past, translating the currency format was handled with WPML String Translation but we have now a better solution for this, about which I was not yet fully aware. Please take note that you now have currency settings for second currencies on WooCommerce > WooCommerce Multilingual & Multi-Currency > Multicurrency. Click on the pencil behind your second currency. Now, again click on the pencil on the currency settings page. You will be now able to change position and the separators for the second currency. See screenshot. Please use this settings screen and delete the translations from String Translation. Best regards |
March 15, 2024 at 10:53 am #15413992 | |
willR-4 |
I removed the string translations and added the EUR format as described. When I opened this ticket, the formatting of the 2nd currency (EUR) was being applied to the main currency (GBP), and I confirm that's no longer the case. There are still two problems: 1) The currency format is no longer language specific. So now on the EN site, the EUR is appearing in the FR format (1 234,00 €) and on the FR site, GBP appears in EN format. Currency format should be by language, not by currency. So this recent change in how currencies are formatted needs more work to allow for this. This is a major problem. 2) The currency switcher doesn't work consistently in all cases. I tried a number of configurations and tested using a VPN. Depending on settings and which country I'm in, the currency switcher is buggy. This includes not staying selected when navigating between pages (mainly on the FR site), or not changing when using the selector. I have tried changing the following settings, and I haven't found a single configuration where it works in all cases. Here are the setttings I've tried: Main settings page (hidden link), 'Default customer location' = 'Geolocate (with caching support)' and 'No location by default'. Multi-currency page (hidden link), 'Show currencies based on' = either value (language or location). On the same page, 'Currency displayed first' set to GBP for EN and EUR for FR and also, with 'Keep' for both languages. I am in France, which may explain why the currency switcher keeps reverting to EUR on the FR site. I used a VPN and set my location to the UK and still have problems. For example, selecting a different currency doesn't always work while on the page, but then it does when going to a different page. Note that the server has PHP page caching for users that aren't logged in. So please test in an anonymous browser window. Thanks for your continued help. New threads created by Andreas W. and linked to this one are listed below: |