<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSSpellServerDelegate/spellServer(_:suggestCompletionsForPartialWordRange:in:language:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(pl)NSSpellServerDelegate(im)spellServer:suggestCompletionsForPartialWordRange:inString:language:"
  },
  "title" : "spellServer(_:suggestCompletionsForPartialWordRange:in:language:)"
}
-->

# spellServer(_:suggestCompletionsForPartialWordRange:in:language:)

This delegate method returns an array of possible word completions from the spell checker, based on a partially completed string and a given range.

```
optional func spellServer(_ sender: NSSpellServer, suggestCompletionsForPartialWordRange range: NSRange, in string: String, language: String) -> [String]?
```

## Parameters

`sender`

The `NSSpellServer` object that sent this message.

`range`

The range of the partially completed word.

`string`

The string containing the partial word range.

`language`

The language to use for the completion.

## Return Value

An array of `NSString` objects indicating possible completions.

## See Also

  <doc://com.apple.documentation/documentation/AppKit/NSSpellChecker/completions(forPartialWordRange:in:language:inSpellDocumentWithTag:)>



---

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)