<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/LocalizedStringKey/StringInterpolation/appendInterpolation(_:formatter:)-9vdw4",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI18LocalizedStringKeyV0D13InterpolationV06appendF0_9formatteryx_So11NSFormatterCSgt10Foundation20ReferenceConvertibleRzlF"
  },
  "title" : "appendInterpolation(_:formatter:)"
}
-->

# appendInterpolation(_:formatter:)

Appends an optionally-formatted instance of a Foundation type
to a string interpolation.

```
mutating func appendInterpolation<Subject>(_ subject: Subject, formatter: Formatter? = nil) where Subject : ReferenceConvertible
```

## Parameters

`subject`

The Foundation object to append.

`formatter`

A formatter to convert `subject` to a string
representation.

## Discussion

Don’t call this method directly; it’s used by the compiler when
interpreting string interpolations.

---

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)