Sorry, we don't support your browser.  Install a modern browser
This post is closed.

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

3 years ago
Changed the status to
In progress
3 years 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?

3 years 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?

3 years 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.

3 years ago
Changed the status to
In upcoming releases
3 years ago
Changed the status to
Completed
3 years ago
1