Has anyone successfully gotten plurals to preview in SwiftUI?
Apple uses a .stringsdict file for handling pluralization. However, when attempting to render that string in a preview, for example:
Text("days \(1)", tableName: "Pluralized", bundle: Bundle.module)
The pluralization never seems to work properly when previewed in Xcode. At runtime it works.
You have to use
lld, notd, as your format character for the number.This does not work:
Instead, write your pluralized string in this way: