You can't set it per application, but you can set it to support multiple languages and detect them automatically.
To do so (in Lion - although I've been using this at least since Leopard), open System Preferences, go to Language & Text, select the Text tab, set Spelling to Automatic by Language, then open the Spelling dropdown again, select Setup... at the bottom and check the languages you want to enable.
Direct Answer
Based on this link, I think the file you are looking for is:
/private/var/mobile/Library/Keyboard/dynamic-text.dat
Look at the link above to see full instructions.
Original Post
Slow Way
To reject the suggested word, finish typing the word as you want it, then tap the x
to dismiss the suggestion before typing anything else. Each time you reject a suggestion for the same word, the iPhone becomes more likely to accept your word.
Fast Way
Reset the keyboard dictionary: Choose Settings
> General
> Reset
and tap Reset Keyboard Dictionary
. Resetting the keyboard dictionary erases all words you’ve added, and you can start over with a clean slate.
Second Option (Apps)
Looking at this post, it seems that there are two apps that could allow you to do this.
AutoCorrector ($0.99) allows you to add custom words to your iPhone’s dictionary so they are recognized and suggested by the autocorrect. You can also add list of short-hand words you use in text messages. The app doesn’t recognize all words – certain swear words are off-limits, however it’s an easy way to train your iPhone to behave.
ManualCorrect Pro ($0.99) is available through the Cydia store and works on jailbroken iPhones. The app switches some of the autocorrect features, so that you have to tap on the autocorrect bubble for it to be activated. The app also contains the ability to turn on autocorrect features for correct punctuation, and correct capitalization. Like AutoCorrector, you can create your own list of custom shortcuts.
Links/References
https://discussions.apple.com/thread/2430621?start=0&tstart=0
http://www.zeropaid.com/news/101147/6-ways-to-improve-your-iphones-autocorrect/
Best Answer
It's called LocalDictionary not Library & is just a plain text file, but has no .txt extension. I also have two others, called en and en_GB. I really don't know what the difference is, but they all contain different custom word lists.
Presumably, if there isn't one there already, you just need to create one.
If you don't want the task of doing that yourself, then right click any word the regular spellcheck doesn't like & 'Learn Spelling' - I'm pretty sure that should create the file & populate it with your first word.
One thing to note, if you're going the DIY route for this - words are in alphabetical order, not just added by date to the next line.