Currency symbol doesn't show up

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
guillerbm7
User
Posts: 13

Currency symbol doesn't show up

Post by guillerbm7 »

Hi, I'm currently working on PHPMaker2023 and I'm having problems with the Languages or more precisely, the currency symbol.

I've set fields on Currency format, set the Locale settings on es-ES (I want to use €) and added a spanish.xml file to my project and also in Roaming\phpmaker2023\languages. It doesn't work, not even showing the $ symbol.

Any ideas?


arbei
User
Posts: 9286

Post by arbei »

By default the "es-ES" locale uses €, you do not need to do anything (no need to customize the locale under Tools -> Locale Settings). Just make sure your language file uses the language id "es-ES", not "es".

To show a field as currency, make sure you have set the format as "Currency" under View Tag.


guillerbm7
User
Posts: 13

Post by guillerbm7 »

Hi!

Thanks for answering, but already tried it and still not working.

<ew-language date="2023/1/25" version="19.8.0" id="es-ES" name="español (España)" desc="español (España)" author="NOT e.World Technology Ltd.">

This is the beginning of my xml file.

It's such a weird situation, it's all checked and re-checked...


arbei
User
Posts: 9286

Post by arbei »

arbei wrote:

To show a field as currency, make sure you have set the format as "Currency" under View Tag.


guillerbm7
User
Posts: 13

Post by guillerbm7 »

Yes, I've already done that and nothing.


arbei
User
Posts: 9286

Post by arbei »

  1. Did you try to customize the locale settings under Tools -> Locale Settings?
  2. Check the "locale" folder under the project folder. If you did not customize, the folder should be empty.
  3. Check the "lang" folder under the project folder and the language ID in the language file (.xml) under that folder.

guillerbm7
User
Posts: 13

Post by guillerbm7 »

  • I've changed the Locale settings for es-ES

  • I've checked project/locale/es-ES.json

    {
      "id": "es-ES",
      "desc": "español (España)",
      "number": "#,##0.###",
      "currency": "#,##0.00 ¤",
      "currency_code": "EUR",
      "currency_symbol": "€",
      "percent": "#,##0 %",
      "decimal_separator": ".",
      "grouping_separator": ",",
      "numbering_system": null,
      "date": "d/M/yy",
      "time": "H:mm",
      "time_zone": null
    }
  • The Id of the spanish.xml file is "es-ES".

I've also tried to delete these files and regenerate them, change the language to English, generate and change to Spanish.

I've read some code trying to find some function/class to add the proper currency symbol based on the language, and there doesn't seem to be any or, at least, there don't seem to be any being used.


arbei
User
Posts: 9286

Post by arbei »

What is the charset of your project under HTML Settings -> General? Make sure it is "utf-8".


guillerbm7
User
Posts: 13

Post by guillerbm7 »

Yep, it's "utf-8".


Webmaster
User
Posts: 9425

Post by Webmaster »

If you are a registered user, you can send your project files and language files to support for testing.


arbei
User
Posts: 9286

Post by arbei »

  1. Make sure you have PHP >= 7.4 with the intl extension installed, you may check by phpinfo.
  2. Enable Debug and check if there are any PHP errors logged in the log file.

Post Reply