One Logo Pool Ball
Foundation · IOS API REFERENCE

AttributeScopes.FoundationAttributes.AgreementArgumentAttribute

enum · iOS 17.0+ · SDK 27.1

@frozen enum AgreementArgumentAttribute

An attribute that represents grammatical agreement with an argument in a localized string. Many languages require grammatical agreement in their sentences. In Spanish, for example, adjectives and verbs need to agree with the gender of the subject they refer to. Use the `agreeWithArgument` attribute to make a word at one position in a sentence inflect to agree with a word at another position, eliminating the need to include multiple gendered forms in localization files. In a localization file, wrap the word needing inflection in an `agreeWithArgument` attribute and point it to the replacement index of the word it needs to agree with: ``` // In the Spanish localization file: "Your %1@ %2@ is ready." = "Tu ^[%2$@ %1$@](inflect: true) está ^[listo](agreeWithArgument: 2)." ```

Members (2)

get · iOS 17.0+

markdownName

TypeScript
static get markdownName(): string
Swift declaration
static let markdownName: String

The Markdown name associated with an attributed string key.

get · iOS 17.0+

name

TypeScript
static get nameValue(): string
Swift declaration
static let name: String

The name of the key.

Skipped declarations

No declarations were skipped in this snapshot.

All Foundation types →