0

Hello

Say I have a document which is written in phonetic. Now I want to make this indic. How can I do that

Say
A will be আ
B will be ব
AA will be আ
Ba will be বা
T will be ট
t will be ত
etc......

Please help me

4
Contributors
4
Replies
5
Views
6 Years
Discussion Span
Last Post by metalix
0

Hello

Say I have a document which is written in phonetic. Now I want to make this indic. How can I do that

Say
A will be আ
B will be ব
AA will be আ
Ba will be বা
T will be ট
t will be ত
etc......

Please help me

$alpha = array("A","B","AA");
$indic = array("আ","ব","আ");
$message = str_replace($alpha,$indic,$message);

Just fill the rest in $alpha and $indic.

0

I'd use preg_replace. I believe there was an option not to break the UTF strings.
I think the option was "u"
.e.g
preg_replace('#A#siu', 'আ', $str);

0
$alpha = array("A","B","AA");
$indic = array("আ","ব","আ");
$message = str_replace($alpha,$indic,$message);

Just fill the rest in $alpha and $indic.

Thank you but I need advance for example
ABaT will be আবাট
ABat will be আবাত

Then what should I do. Thank You

0

Is there a particular pattern to the replacement?
Usually languages are based on sentence base translation, then word translation, then alphabetic translation, as this is the most reliable way, however you will need an extensive dictionary to cover the entire language, perhaps see if there is a prebuilt translator?

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.