---
title: "init(stringInterpolation:)"
framework: foundation
role: symbol
role_heading: Initializer
path: "foundation/localizedstringresource/init(stringinterpolation:)"
---

# init(stringInterpolation:)

Creates a localized string resource from the given string interpolation.

## Declaration

```swift
init(stringInterpolation: String.LocalizationValue.StringInterpolation)
```

## Parameters

- `stringInterpolation`: The key to use when looking up a localized value, created from a string interpolation.

## Discussion

Discussion To create a localized string key from a string interpolation, use the \() string interpolation syntax. Swift matches the parameter types in the expression to one of the appendInterpolation methods in LocalizedStringResource/StringInterpolation. This initializer uses the default values from LocalizedStringResource/init(_:table:locale:bundle:comment:) for the table, locale, bundle, and comment.

## See Also

### Creating a localized string resource from literal values

- [init(stringLiteral:)](foundation/localizedstringresource/init(stringliteral:).md)
