Customizing Number Format
Automatic Formatting by Language
Section titled “Automatic Formatting by Language”WP-ImmoMakler automatically adjusts number formats — such as prices and area measurements — based on the language configured in WordPress. This applies to displays like 350.000 EUR or 120,50 m2.
The formatting is determined via get_locale() and follows these conventions:
| Language | Format |
|---|---|
| German (Germany) | 123.456,00 |
| German (Switzerland) | 123’456,— |
| English (UK) | 123,456.00 |
Checking the Language Setting
Section titled “Checking the Language Setting”If numbers are not displayed in the expected format, make sure the correct language is selected.
Navigate to Settings > General > Site Language to verify the active language of your WordPress installation.
Multilingual Websites
Section titled “Multilingual Websites”For multilingual websites using plugins like WPML, WP-ImmoMakler dynamically adjusts the number format to the visitor’s currently active language.
Customizing the Swiss Format
Section titled “Customizing the Swiss Format”The Swiss format displays -- instead of 00 as decimal places by default (for example, 123'456,--). If you want to disable this behavior and display 123'456,00 instead, please add the following filter to the functions.php of your WP-ImmoMakler Child-Skin-Plugin:
add_filter( 'immomakler_number_format_i18n_ch_dash', '__return_false' );This filter prevents the default display from being replaced by the Swiss special format.
Further Customization
Section titled “Further Customization”For more specific formatting requirements — such as swapping decimal and thousands separators for certain field types — additional filter hooks are available. If you have any questions, feel free to contact our Support.