Hi,
My younger sister (12) has written a language called Tyra. I wrote her a rough and ready dictionary, complete with word-for-word translation. All works fine, using a MySQL backend.
At the moment, say someone enters the phrase
"Now is the time for faith to shine"
It takes the sentence, explodes() it at spaces, and then replaces each whole word.
So far, so good, it returns:
"iraydo lida sade monoro lisden shadea solus firé"
Only problem is when punctuation is involved,
e.g.
"Now, faith must shine"
What I want returned here, is the translation:
"iraydo, shadea gadem firé"
But, the "," is retained in the array, and hence no match is found.
I suppose what I want to do is to remove all punctuation, and then put it back at the end, in the right position.
Any ideas?
ucbones