Title: Comma separator
Last modified: May 21, 2021

---

# Comma separator

 *  Resolved [Rafał](https://wordpress.org/support/users/ayek/)
 * (@ayek)
 * [5 years ago](https://wordpress.org/support/topic/comma-separator-2/)
 * Hi!
    How to change separator from dot to comma? I still need it for flat area
   or lot size area.

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [Estatik](https://wordpress.org/support/users/estatik/)
 * (@estatik)
 * [5 years ago](https://wordpress.org/support/topic/comma-separator-2/#post-14474853)
 * Hello!
    Thank you for your request. You can use str_replace function for replace
   comma with dot in es_get_the_formatted_field, es_get_the_area, es_get_the_lot_size
   filters. As a result Area and Lot size fields will display dots as delimiters
   in website front-end. Regards, Estatik.
 *  Thread Starter [Rafał](https://wordpress.org/support/users/ayek/)
 * (@ayek)
 * [5 years ago](https://wordpress.org/support/topic/comma-separator-2/#post-14475354)
 * Dot → Comma
    Eg. 120.55 m² → 120,55 m² File: `\wp-content\plugins\estatik\templates\
   property\fields.php` copied as: `\wp-content\themes\my-theme\estatik\property\
   fields.php`
 * Line: 17
    `<?php $value = is_array( $field[ key( $field ) ] ) ? implode( ', ',
   $field[ key( $field ) ] ) : $field[ key( $field ) ]; ?>` changed to: `<?php $
   value = is_array( $field[ key( $field ) ] ) ? implode( ', ', $field[ key( $field)]):
   str_replace('.',',',$field[ key( $field ) ]); ?>`
 * Works for me.
    Could do better?
 *  Thread Starter [Rafał](https://wordpress.org/support/users/ayek/)
 * (@ayek)
 * [5 years ago](https://wordpress.org/support/topic/comma-separator-2/#post-14475863)
 * Better to use `preg_replace` function, so:
 * `<?php $value = is_array($field[key($field)]) ? implode(', ', $field[key($field)]):
   preg_replace('/(\d)\.(\d)/', '\1,\2', $field[key($field)]); ?>`
 * Find a dot **between two digits**, then replace.
 *  Plugin Author [Estatik](https://wordpress.org/support/users/estatik/)
 * (@estatik)
 * [5 years ago](https://wordpress.org/support/topic/comma-separator-2/#post-14475908)
 * Thank you for your reply, Rafał!
    Your modifications should work fine within 
   one section – Basic facts. So, for example if you move Area and Lot Size fields
   to another section, the dot delimiter will appear again. Regards, Estatik.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Comma separator’ is closed to new replies.

 * ![](https://ps.w.org/estatik/assets/icon-256x256.png?rev=2819514)
 * [Estatik Real Estate Plugin](https://wordpress.org/plugins/estatik/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/estatik/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/estatik/)
 * [Active Topics](https://wordpress.org/support/plugin/estatik/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/estatik/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/estatik/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Estatik](https://wordpress.org/support/users/estatik/)
 * Last activity: [5 years ago](https://wordpress.org/support/topic/comma-separator-2/#post-14475908)
 * Status: resolved