I think this will help...
I was trying to get the SAMSUNG NOTE 3 with ANDROID 5.0 (chewing-gum on my shoe) to ADD WORDS TO MY DICTIONARY and for the best will in the world, GET RID OF THE RED UNDERLINING...
Do this in any text-entry place:
1. Type the word/name your want (ignore any suggestions or auto-corrections and do what you gotta do to get the mofo to show the text exactly as you want it - bear with me)
2. Long-press on the word (on my phone if you do that then some buttons appear above or below the word like "select all" and "copy" or whatever - but that's ok, ignore it).
3. After you remove your finger from the long press and the text is still highlighted, even if the buttons mentioned in (2.) appear, just swipe down on the word a little distance
4. You will notice that the word becomes highlighted in a very nice light red/pink colour and there is a small drop-down list. The list might contain some spelling suggestions, but more importantly for this purpose, ADD TO DICTIONARY.
5. Do what you gotta do
I was annoyed at this feature because I was trying to get my lock screen personal message to appear without an ugly red line under it. My message was supposed to be { الحمداللہ } but stupid auto-correct kept changing it to { الحمداللۃ } which is just wrong. So once I finally managed to get the thing to display what I wanted, I was not pleased to find a red line under the phrase. Anyway, it's all sorted now, thank God, so I just thought I'd share that for anyone else who was struggling.