<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/LocalizedStringResource/init(_:table:locale:bundle:comment:)-69k32",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation23LocalizedStringResourceV_5table6locale6bundle7commentACSSAAE17LocalizationValueV_SSSgAA6LocaleVAC17BundleDescriptionOs06StaticC0VSgtcfc"
  },
  "title" : "init(_:table:locale:bundle:comment:)"
}
-->

# init(_:table:locale:bundle:comment:)

Creates a localized string resource from a localization key and its bundle properties.

```
init(_ keyAndValue: String.LocalizationValue, table: String? = nil, locale: Locale = .current, bundle: LocalizedStringResource.BundleDescription = .main, comment: StaticString? = nil)
```

## Parameters

`keyAndValue`

The key for an entry in the specified table.

`table`

The name of the table containing the key-value pairs. If not provided, `nil`, or an empty string, this value defaults to `Localizable.strings.`

`locale`

The locale for the resource to use. By default, the resource uses [`current`](/documentation/Foundation/Locale/current).

`bundle`

A [`LocalizedStringResource.BundleDescription`](/documentation/Foundation/LocalizedStringResource/BundleDescription) that indicates where to locate the table’s strings file. By default, the resource uses the main bundle.

`comment`

The comment to place above the key-value pair in the strings file. This parameter provides the translator with some context about the localized string’s presentation to the user.

---

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)