Posts

Post not yet marked as solved
7 Replies
5.3k Views
Hello,I was watching the WWDC video:Introducing SwiftUI: Building Your First Apphttps://developer.apple.com/videos/play/wwdc2019/204/The had some sample code at 48:32 for localising the string used in inText("\(room.capacity) people")They used a stringdict file, but didn't expand on the details of configuring the string (here's the file I created in plain xml):<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>%lld people</key> <dict> <key>NSStringLocalizedFormatKey</key> <string>%#@VARIABLE@</string> <key>VARIABLE</key> <dict> <key>NSStringFormatSpecTypeKey</key> <string>NSStringPluralRuleType</string> <key>NSStringFormatValueTypeKey</key> <string></string> <key>zero</key> <string></string> <key>one</key> <string></string> <key>two</key> <string></string> <key>few</key> <string></string> <key>many</key> <string></string> <key>other</key> <string></string> </dict> </dict> </dict>The only thing they showed in the conference video was<key>%lld people</key>What should I do to complete the details for this string (in the Localizable.stringdict file) to be picked up by SwiftUI automatically and be localised (e.g. in french?), I did the other strings (the plain - not interpolated ones) in a Localizable.strings file and they localised fine.Also, is that %lld people (as two Ls or two capital i's in the %LLD or %IID?)Thanks
Posted
by gbdavid.
Last updated
.