-
Unlock the power of grammatical agreement
Discover how you can use automatic grammatical agreement in your apps and games to create inclusive and more natural-sounding expressions. We'll share best practices for working with Foundation, showcase examples in multiple languages, and demonstrate how to use these APIs to enhance the user experience for your apps.
For an introduction to automatic grammatical agreement, watch “What's new in Foundation” from WWDC21.Capítulos
- 0:00 - Introduction
- 1:28 - Grammatical agreement
- 3:12 - Dependency agreement
- 8:07 - Inclusive language
- 11:05 - Demo
- 17:31 - Wrap-up
Recursos
Vídeos relacionados
WWDC23
WWDC22
WWDC21
-
Buscar neste vídeo...
-
-
4:08 - agreeWithConcept
// Formatting the string var options = AttributedString.LocalizationOptions() options.concepts = [.localizedPhrase(food.localizedName)] let size = AttributedString(localized: "small", options: options) -
8:45 - Preferred terms of address
// A person who is delivering the food order struct DeliveryPerson { // The person's preferred name var name: String // An avatar for the delivery person var avatar: Image // The person's preferred terms of address. This list may contain more than // one option, we will use the first applicable one for the language that's // used in the UI. var preferredTermsOfAddress: [TermOfAddress] } // Formatting the message in Swift var options = AttributedString.LocalizationOptions() options.concepts = [.termsOfAddress(person.preferredTermsOfAddress)] let message = AttributedString(localized: "\(person.name) is on ^[their](referentConcept: 1) way.”, options: options)
-