<!--
{
  "availability" : [
    "iOS: 13.0.0 -",
    "iPadOS: 13.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 13.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 6.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "NaturalLanguage",
  "identifier" : "/documentation/NaturalLanguage/NLGazetteer/write(_:language:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Natural Language"
    ],
    "preciseIdentifier" : "c:objc(cs)NLGazetteer(cm)writeGazetteerForDictionary:language:toURL:error:"
  },
  "title" : "write(_:language:to:)"
}
-->

# write(_:language:to:)

Creates a gazetteer from a set of labels for terms represented by a dictionary and saves the gazetteer to a file.

```
class func write(_ dictionary: [String : [String]], language: NLLanguage?, to url: URL) throws
```

## Parameters

`dictionary`

The dictionary of labels and an array of terms for each label.

`language`

The language of the text in the dictionary.

`url`

The location in the file system to which the file should be written.

---

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)