<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFCopyLocalizedString",
  "metadataVersion" : "0.1.0",
  "role" : "Macro",
  "symbol" : {
    "kind" : "Macro",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@macro@CFCopyLocalizedString"
  },
  "title" : "CFCopyLocalizedString"
}
-->

# CFCopyLocalizedString

Searches the default strings file `Localizable.strings` for the string associated with the specified key.

```
#define CFCopyLocalizedString(key, comment)
```

## Parameters

`key`

The development language version of the string. This string is used as the search key to locate the localized version of the string.

`comment`

A comment to provide the translators with contextual information necessary for proper translation.

## Return Value

The localized version of the requested string. Returns `key` if no value corresponding to `key` is found. Ownership follows the [The Create Rule](https://developer.apple.com/library/archive/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029).

## Discussion

This is a macro variant of [`CFBundleCopyLocalizedString(_:_:_:_:)`](/documentation/CoreFoundation/CFBundleCopyLocalizedString(_:_:_:_:)) for use with the `genstrings` tool.

---

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)