How do I set the decimal separator in Drupal8?

by AleRinaldi   Last Updated September 14, 2018 13:07 PM

I'm working on an Italian Drupal8 website, where I need to show decimal or float fields with the comma "," instead of the dot "." as decimal separator.

I tried installing a clean Drupal8 website choosing Italian as language and Italy as default country. Then I added a decimal field to the Page content type. While I can (actually, I must) use the comma as decimal separator while creating the content, in the content visualization I always get a dot. I tried playing a lot with PHP intl settings, even in a desperate attempt I tried putting setlocale(LC_ALL, 'it_IT.utf8'); in index.php, but nothing changed.

How can I achieve this wihtout having to manually format the field programmatically?

Tags : 8 i18n-l10n


Related Questions


Keep node/user tabs in one language

Updated May 16, 2016 08:03 AM

How do I include a custom module translation?

Updated June 28, 2016 08:03 AM

Adding an existing node as a translation

Updated August 09, 2016 08:03 AM

Drupal 8: make Taxonomy terms translatable

Updated August 16, 2016 08:04 AM

How to show 404 page for nodes without translation?

Updated September 01, 2016 08:04 AM