1

I'm calling Microsoft translator for converting arabic names to english But it translates the names , i just want to convert the names

for example: أحمد ماهر

need to be Ahmed Maher

the service is working but it translates the meaning of the names not just the names

user1304984
  • 41
  • 1
  • 1
  • 3

3 Answers3

1

I don't know about other languages but for your example أحمد ماهر = Ahmed Maher What I know is romanizations doesn't work with it

Why? because of the inflection and the letters "movements" that give the one letter more than one pronunciation. for example

مَح = Mah مُح = Muh

Same letters but with a different pronunciation.

The solution that I've made is rules to convert the names You can find the code and the npm package that I've made. If you got any questions, issues or you tried to understand the rules for the Arabic I will be happy to help.

Please check below to know more about the needed rules to convert an Arabic name:

First Letter Rule I am checking if the letter was the first letter since if the letter “و” was the first one people tend to write it “W” but if it was inside the word it will be written “O”.

Inner Letter Rule By this I mean all the letters that are not the first nor the last and it will be changed based letter like the first image “م” will equal “H”

Next Letter Rule In this rule am checking the letter and the upcoming one. like if the letter was “م” and the next one was “ع” it should be written ”Mua” if the letter was “م” and the next one was “ي” it should be written “May”  Special Letter Rule It looks like the next letter rule but it will include another action like “slice” ex: in the “First Letter Rule” I said that “و” inside the word will be converted to “O” .”ا" I will need to delete the “O” and put a “w” then “A” for the ”ا“ But if the next letter was And I believe this rule could be enhanced but it’s important to have.

Last Letter Rule Without this rule, the name “Sarah” will be converted from Arabic to “Sara” This rule checks if the last letter is “ه“ ”ة” if it is it will add the “H” to complete the name.

user8760832
  • 71
  • 1
  • 4
0

Sounds like you want a character substitution, not a true translator. You could build your own transliterator with String.Replace.

Someone asked a similar question about transliterating Cyrillic to Latin: How to transliterate Cyrillic to Latin text

Community
  • 1
  • 1
Denise Skidmore
  • 2,286
  • 22
  • 51
  • thanks @Denise Skidmore i've seen the question you've mentioned , and i'm very interested about Microsoft Transliteration Utility i've tried to use it , but i faced a problem while create translations file (.tms), and because that library is not famous i can't find any online documentation if you have any suggestion , please let me know thanks – user1304984 Mar 03 '13 at 16:03
  • I have no experience with it. If I couldn't find any documentation, I'd start with a stock tms file and try to modify it. – Denise Skidmore Mar 05 '13 at 14:49
0

If it is on a web site, you can enable the Collaborative Translations Framework functionality in the Widget, and use that to 'override' the translation into a name.

The API also supports this if you are building an app.

Widget documentation is here: http://blogs.msdn.com/b/translation/p/ctf1.aspx and here: http://blogs.msdn.com/b/translation/p/ctf2.aspx

Laurence Moroney
  • 1,263
  • 8
  • 20