[MOD]V5 Multilanguage T9 dialer


roenano

Members
Nov 7, 2010
722
65
I have promised this mod to many people for long time. After I found the way to make it work with custom languages other than Hebrew (the one was made for in first place), I'm glad to announce I'm taking requests.

First I want to credit 4PDA.ru people for cracking it in fisrt place and Yosriz for the reverse engineering to have it working for Hebrew (the actual code I base my work on) and lenny_kano for merging all languages together.

*This mod is included In the multilang rom. If after installing the rom it doesn't work go to Contacts "Settings" -> "More contacts settings" -> "Rebuild index data".

If you want me to make this mod for your language, you'll have to provide me the characters which have to be searched and in which number it appears. If the character appears in the English alphabet there's no need to add it. For example:

Spanish:
Number 2: á - Á
Number 3: é - É
Number 4: í - Í
Number 6: ñ - Ñ - ó - Ó
and so on....

Available languages:
Spanish
Russian
Greek
Polish
Swedish
German
Hungarian
Korean
Vietnamese
Czech
Slovak
Slovene
Turkish
Hebrew
Arabic
Persian
Ukrainian

Pending Languages:
NONE
 
For rom devs only!!
If you include it in your rom please give credit by linking to this thread. Thanks

It'll be a bit hard to automatize it because the code is obfuscated on some devices so if the guys in China add or remove one member or method all the names will change.
I've tried to make the implementation as easy as it can be so I moved all the related code to a separate class you need to add to ContactsProvider and just replace one method of one of the existing classes there to use the new code.

You need to decompile ContactsProvider.apk, go to smali/com/android/provider/contacts/t9 and open T9Utils.smali (f.smali or h.smali when obfuscated), there you will find a method ".method public static formatCharToT9(C)C" (or ".method public static b(C)C" when obfuscated) and replace its content with the below:
Code:
    .locals 1
    .parameter "c"
 
    .prologue
    .line 5
    invoke-static {p0}, Lcom/android/providers/contacts/t9/T9MultiUtils;->formatCharToT9(C)C
 
    move-result v0
 
    return v0

All that remains to do is to copy the attached smali file T9MultiUtils.smali to the same folder.
 

Attachments

  • T9MultiUtils.zip
    3 KB · Views: 916
this should be a sticky! great work roenano!

As you can see there's no much interest in it, may be people just doesn't know about this post. So for now, no sticky...

Just updated the Spanish one for this week.

Now working on Greek one!!
 
add russian pls

number 2 \u0410 А \u0411 Б \u0412 В \u0413 Г
\u0430 а
\u0431 б
\u0432 в
\u0433 г


number 3 \u0414 Д \u0415 Е \u0401 Ё \u0416 Ж \u0417 З
\u0434 д
\u0435 е
\u0451 ё
\u0436 ж
\u0437 з



nuber 4 \u0418 И \u0419 Й \u041A К \u041B Л
\u0438 и
\u0439 й
\u043A к
\u043B л



number 5 \u041C М \u041D Н \u041E О \u041F П
\u043C м
\u043D н
\u043E о
\u043F п



number 6 \u0420 Р \u0421 С \u0422 Т \u0423 У
\u0440 р
\u0441 с
\u0442 т
\u0443 у


number 7 \u0424 Ф \u0425 Х \u0426 Ц \u0427 Ч
\u0444 ф
\u0445 х
\u0446 ц
\u0447 ч


number8 \u0428 Ш \u0429 Щ \u042A Ъ \u042B Ы
\u0448 ш
\u0449 щ
\u044A ъ
\u044B ы


number 9 \u042C Ь \u042D Э \u042E Ю \u042F Я
\u044C ь
\u044D э
\u044E ю
\u044F я
 
For Russian will be very easy, as it was already done by devs at 4PDA.ru, I just have to find the code in my computer.

EDIT: for some reason your post was marked as spam. Fixed!
 
Just updated the OP with Greek and Russian
Please do a nandroid backup before flashing it and give feedback about how it works as I'm not able to test it!!

Enjoy it!!!
 
Have you followed the instructions in the first post? The part about changing the locale is crucial!!
BTW, if you have Nexus S you need to mount "/system" manually in recovery before flashing the zip.
 
Polish T9

2
ą 0105
Ą 0104
ć 0107
Ć 0106

3
ę 0119
Ę 0118

5
ł 0142
Ł 0141

6
ń 0144
Ń 0143
ó 00F3
Ó 00D3

7
ś 015B
Ś 015A

9
ż 017C
Ż 017B
ź 017A
Ź 0179