Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access iOS dictionary programmatically

I'm looking for a way to access iOS dictionary programmatically. What I need is to retrieve the list of the words of a particular language from inside a custom app.
Is it possible? Are there any API that provide this (or similar) functionality?
I've checked Apple documentation but didn't find anything useful...May someone point me to the right direction?

like image 253
Manlio Avatar asked Sep 14 '11 16:09

Manlio


2 Answers

There is an API for bringing up the built-in dictionary UI (not the original question but raised in some of the responses), including checking for whether a given word is defined:

if ([UIReferenceLibraryViewController dictionaryHasDefinitionForTerm:@"word"]) {     UIReferenceLibraryViewController* ref =          [[UIReferenceLibraryViewController alloc] initWithTerm:@"word"];     [currentViewController presentViewController:ref animated:YES completion:nil]; } 
like image 165
mrzzmr Avatar answered Oct 14 '22 03:10

mrzzmr


I don't think there is a public API to access the embedded Dictionary. The closest is using UITextChecker but that may not satisfy your needs

As an alternative, you could find and embed a Word Dictionary in the Language you want? It may require some extra work

like image 33
Suhail Patel Avatar answered Oct 14 '22 01:10

Suhail Patel