Application Dictionary
Update
I recently learned about a much more useful API than wiktionary. Google seems to have a "Google Dictionary" that you can use, although this is an unofficial API. Using this query:
http://www.google.com/dictionary/json?callback=dict_api.callbacks.id100&q= {query} & sl = en & tl = en & limit = pr% 2Cde & client = te
You can get JSON result from google dictionary. Substitute a keyword for {query}
(for example q=dog
). Apparently this is the dictionary that google docs uses, and maybe some chrome extensions.
Source: Google Operating System (blog)
PS: The comments also mention the API for Dictionary.com.
Previous answer
You can access the wiki data through the Mediawiki API. This may be enough for what you need. I don't know of any ready-made dictionaries that you could use. If you need a spell checker, you can get Aspell working on iPhone.
Links:
There may also be API wrappers already created in the language you need. Some of them are listed on this page .
If this is not for you, you can try scraping other dictionary sites as well.
Edit
I would probably only try this as a last resort, because (as far as I know) you cannot get readily available results from a wikitionary query. However, you can get the wiki code to write. The problem is that you have to extract important information from this code somehow.
For example, take the following request (click to open in your browser):
http://en.wiktionary.org/w/api.php?action=query&titles=dog&prop=revisions&rvprop=content&format=xml
If you read the documentation, you'll see parts of action=query
, titles=dog
, prop=revisions
, rvprop=content
and format=xml
. They tell the api what you want. It says, "I am running a query for an entry named" dog "and I want the latest content in xml format."
What are you getting:
<api>
<query>
<pages>
<page pageid="24" ns="0" title="dog">
<revisions>
<rev xml:space="preserve">
{{also|DOG|dög}}
==English==
{{wikipedia}}
[[Image:YellowLabradorLooking.jpg|thumb|A dog (a [[Labrador]])]]
... (removed for brevity)
</rev>
</revisions>
</page>
</pages>
</query>
</api>
You will need to handle this somehow.
Either way, you can create the http query strings yourself, or you can use a wrapper for the api that does the hard work of making the requests.
a source to share
I'm looking for an offline paid option, you can look at the lexicontext (full disclosure: it's mine)
a source to share