NSNumberFormatterSpellOutStyle should use the post-1990 spelling in French
| Originator: | nicolas.bouilleaud | ||
| Number: | rdar://28319700 | Date Originated: | 2016-09-16 |
| Status: | Closed (Behaves correctly) | Resolved: | 2017-01-04 |
| Product: | iOS | Product Version: | 10.0 |
| Classification: | Other Bug | Reproducible: | Always |
Summary:
NSNumberFormatterSpellOutStyle uses the old rules regarding hyphens in spell-out numbers in French.
The old rules were to add a hyphen between words under 100.
The “new” (post-1990) rules state that there should be hyphens between all words.
Steps to Reproduce:
The following code sample in Xcode 8, in a fr_FR locale:
```
func cocorico(_ input: Int) -> String {
let formatter: NumberFormatter = NumberFormatter()
formatter.numberStyle = .spellOut
return formatter.string(from: NSNumber(value: input))!
}
cocorico(888)
```
Expected Results:
should output:
```
huit-cent-quatre-vingt-huit
```
Actual Results:
instead, we see
```
huit cent quatre-vingt-huit
```
Hyphens are missing between “huit” and “cent”, and “cent” and “quatre”.
Version:
iOS 10.0.1GM
Notes:
Configuration:
iPhone Simulator
Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
Apple Developer Relations 04-Jan-2017 10:04 PM
Engineering has provided the following information regarding this issue:
Thank you for the feedback. However, we do not believe the post-1990 spelling changes should be adopted for this case.