First come up with an algorithm, and I seriously doubt you're going to do that.
In fact I seriously doubt there exists an algorithm that can do it, and even worse if you have to do it for several languages.
Most likely you're going to end up having to do some sort of dictionary lookup and maintain a dictionary you have to build manually.
oussama_1 commented: Lool..spanking +4
jwenting 1,905 duckman Team Colleague
~s.o.s~ commented: Agreed +15
JeffGrigg commented: Yes; that's what we needed to know. +6
iConqueror commented: one rep to you :) +0
almostbob commented: You are right, and I hate that you are right, I like seeing everything I can think to look at +0
stultuske commented: yes indeed ... typo :) +13
Reverend Jim commented: Nice recursion. +0