<!--
{
  "availability" : [
    "macOS: 10.6.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Host/localizedName",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSHost(py)localizedName"
  },
  "title" : "localizedName"
}
-->

# localizedName

Returns the name used as by default when publishing `NSNetServices`.

```
var localizedName: String? { get }
```

## Return Value

A string containing the computer name.

## Discussion

This is the name displayed in the Finder sidebar, as well as in the Sharing preference panel.

This method only returns an `NSString` when sent to the [`current()`](/documentation/Foundation/Host/current()) instance, all other instances currently return `nil`.

This property is key-value observable.

---

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)