Sorry, we don't support your browser.  Install a modern browser

nicesize() respect the language typography rule#178

As an example nicesize() in French should add a non-breaking space between the number and the unit.

https://github.com/getkirby/kirby/blob/6112f1cb8ebf9c36e8a9f97ae08acc910ddbc792/src/Toolkit/F.php#L546

2 months ago
Changed the status to
In progress
a month ago
1

@Yoan Malié Because of our new I18n::formatNumber() method in 3.5.0, it will also be possible to use locale-specific comma formats for the number.

Quick question: Shouldn’t it always be a non-breaking space, even for English or any other locale?

a month ago

@Lukas I don’t really know for other locale sorry! That’s why I didn’t ask for just adding a non-breaking space, in case some locale don’t use them.
Is this work also for rtl languages?

a month ago

I’d say this is more a general typography question than a locale question. So it’s probably the same for every locale – also considering the reason for the no-break space: Prevent a line break between the number and the unit, which doesn’t depend on the locale.

Good point regarding RTL languages. I’d assume that they are not affected as words in the Latin alphabet are written left-to-right in the middle of RTL text, so it could be the same for SI units. But I have no experience or knowledge about that.

a month ago