<!--
{
  "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" : "Swift",
  "identifier" : "/documentation/Swift/String/LocalizationValue",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Swift"
    ],
    "preciseIdentifier" : "s:SS10FoundationE17LocalizationValueV"
  },
  "title" : "String.LocalizationValue"
}
-->

# String.LocalizationValue

A reference to a localizable string, with optional string interpolation.

```
struct LocalizationValue
```

## Overview

Use this type when the localization key is the localized string value in the development language.  This type also supports creating localized strings that depend on a value you provide at runtime. For example, if your app’s strings catalog contains a localizable entry for `"Hello, \(userName)."`, you create a localized string like the following:

```swift
    let greeting = String(localized: "Hello, \(userName).")
```

If you want to use an arbitary string as your localization key, use [`String`](/documentation/Swift/String) initializers that take a [`StaticString`](/documentation/Swift/StaticString) and a `defaultValue` parameter, like [`init(localized:defaultValue:table:bundle:locale:comment:)`](/documentation/Swift/String/init(localized:defaultValue:table:bundle:locale:comment:))
and [`init(localized:defaultValue:options:table:bundle:locale:comment:)`](/documentation/Swift/String/init(localized:defaultValue:options:table:bundle:locale:comment:)).

If you need to provide localized strings to another process that might be using a different locale, initialize with a `LocalizedStringResource`, using [`init(localized:)`](/documentation/Swift/String/init(localized:))
or [`init(localized:options:)`](/documentation/Swift/String/init(localized:options:)).

## Topics

### Creating a string localization value instance

[`init(_:)`](/documentation/Swift/String/LocalizationValue/init(_:))

Creates a localization value instance.

### Comparing string localization values

### Supporting types

[`String.LocalizationValue.Placeholder`](/documentation/Swift/String/LocalizationValue/Placeholder)

An enumeration of types that can appear as a placeholder in a string interpolation.



---

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)