<!--
{
  "availability" : [
    "iOS: 18.4.0 -",
    "iPadOS: 18.4.0 -",
    "macCatalyst: 18.4.0 -",
    "macOS: 15.4.0 -",
    "tvOS: 18.4.0 -",
    "visionOS: 2.4.0 -",
    "watchOS: 11.4.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Bundle/localizedString(forKey:value:table:localizations:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:So8NSBundleC10FoundationE15localizedString6forKey5value5table13localizationsS2S_SSSgAISayAC6LocaleV8LanguageVGtF"
  },
  "title" : "localizedString(forKey:value:table:localizations:)"
}
-->

# localizedString(forKey:value:table:localizations:)

Look up a localized string given a list of available languages.

```
func localizedString(forKey key: String, value: String?, table tableName: String?, localizations: [Locale.Language]) -> String
```

## Parameters

`key`

The key for the localized string to retrieve.

`value`

A default value to return if a localized string for `key` cannot be found.

`tableName`

The name of the strings file to search. If `nil`, the method uses tables in `Localizable.strings`.

`localizations`

An array of `Locale.Language` corresponding to available localizations. Bundle compares the array against its available localizations, and uses the best result to retrieve the localized string. If empty, we treat it as no localization is available, and may return a fallback.

## Return Value

A localized version of the string designated by `key` in table `tableName`.

---

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)