<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/AttributeScopes/FoundationAttributes/InflectionAlternativeAttribute",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation15AttributeScopesO0A10AttributesV021InflectionAlternativeB0O"
  },
  "title" : "AttributeScopes.FoundationAttributes.InflectionAlternativeAttribute"
}
-->

# AttributeScopes.FoundationAttributes.InflectionAlternativeAttribute

An attribute that provides an alternative inflection phrase when the system can’t achieve grammatical agreement.

```
@frozen enum InflectionAlternativeAttribute
```

## Overview

Use the `inflectionAlternativeAttribute` to provide an alternative phrase for cases where the system can’t achieve unambiguous grammatical agreement.

For example, suppose you want to inflect the masculine form for *welcome* in Spanish, *bienvenido*, but the system doesn’t know the person’s preferred terms of address. Add an `inflectionAlternative` to your [`LocalizedStringResource`](/documentation/Foundation/LocalizedStringResource), setting the alternative word or phrase in single quotation marks. The system uses the alternative when it can’t determine proper grammatical agreement.

```swift
// Define the resource with an inflection alternative.
let resource = LocalizedStringResource("^[Bienvenido](inflect: true, inflectionAlternative: 'Te damos la bienvenida').")

// Use the inflection alternative when the system can't determine agreement.
let result = AttributedString(localized: resource)
// result == "Te damos la bienvenida."
```

## Relationships

### Conforms To

[`MarkdownDecodableAttributedStringKey`](/documentation/Foundation/MarkdownDecodableAttributedStringKey)

[`ObjectiveCConvertibleAttributedStringKey`](/documentation/Foundation/ObjectiveCConvertibleAttributedStringKey)

[`Copyable`](/documentation/Swift/Copyable)

[`AttributedStringKey`](/documentation/Foundation/AttributedStringKey)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`EncodableAttributedStringKey`](/documentation/Foundation/EncodableAttributedStringKey)

[`DecodableAttributedStringKey`](/documentation/Foundation/DecodableAttributedStringKey)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)