<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Swift",
  "identifier" : "/documentation/Swift/String/localizedStringWithFormat(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SS10FoundationE25localizedStringWithFormatyS2S_s7CVarArg_pdtFZ"
  },
  "title" : "localizedStringWithFormat(_:_:)"
}
-->

# localizedStringWithFormat(_:_:)

Returns a string created by using a given format string as a
template into which the remaining argument values are substituted
according to the user’s default locale.

```
static func localizedStringWithFormat(_ format: String, _ arguments: any CVarArg...) -> String
```

---

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)