Related
hi,
I need to create a shortcut to a file or folder using eVC++ 4.0, anybody knows how to do this??
Thaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaanx alot
Mohammad
It's very easy:
Just create a file (with lnk extension)
and write to it:
10#"my_app.exe" -launch
this is what it means:
10 - length of the string after #. This value doesn't have to be accurate because it is usually ignored.
"my_app.exe" - path and name of the target of the shortcut.
-launch - command line parameters (if you have any)
You can also add: ?incon.exe,0 to take an icon from another exe / dll
Thaaaaaaaaaaaaaaank you very very much,
but I need a small thing, could you please provide me with a complex example so I can understand all features supported for shortcuts.
Thank you again,
Mohammad
Mo.
A number of us have posted about the structure of the .lnk file.
Search against my username for the word completeness.
V
now, I searched and got how the thing works, but I have a problem with coding this stuff:
When I attemp to write to shortcut file like this:
strData.Format(_T("%d#\"%s\""),strFilename.GetLength(), element.strPathname);
ShortcutFile.Write(strData,strData.GetLength()*2);
The file is not written correctly, what I get is the data I wrote in the file with a square charecter after each letter like this:
#□4□0□"□\□S□t□o□r□a□g□e□ □C□a□r□d□\□M□y□P□r□o□g□r□a□m□.□E□x□e□"□
so how can I solve this? and does it relate to unicode?
That's because you are trying to write it in UNICODE. This adds zero to every byte.
You must use fopen, fprintf, fclose functions or just create an array of char and use FileWrite to create an ASCII text file.
Thanks levenum,
but isn't windows ce file system unicode based? if so, how can I use ASCII format to write unicode filenames?
Thanks alot
Mohammad
#include <Oleauto.h>
......
char convertUshortToChar(unsigned short in)
{
char con='\0';
VarI1FromUI2(in,&con);
return con;
}
and add Oleaut32.lib to the list of object/library moduals in you project settings.
just call that for each unicode character that you want to be ascii and write the result to file.
Two things:
a) The file system may be UNICODE, but shortcuts are ASCII text. Also ASCII functions like fopen are supported.
b) There is a much easier way to convert UNICODE to ASCII:
mbstowcs(unicodeStrBuffer, asciiStrBuffer);
OK, I did it, but I think that there is a problem with Windows mobile, and it is a big problem.
Till now, I beleive that you cannot create a shortcut to a unicode-named file, I failed to do that, File explorer was not successful, Resco Explorer was not better.
Worse, they do not tell you that you cant create the shortcut, they create the shortcut for you and when you try to open it they conclude that the path was not found!!.
Very bad huh?
Mohammad
I thought that all file names are in unicode?? Use my shortcut creator in GSMbeam file open dialog to try and make a shortcut to a file named like you said. If that shortcut dose not work send me the file in question and I will try and see whats going on.
Ok, I downloaded your program and tried to create a shortcut for an arabic-named file, simply it did not work.
I know its not a bug in ur program, its a bug in Windows Mobile, it is mainly a bug in the design itself, how does Micro$oft design windows mobile to be unicode based while non-ascii characters are not supported in the shell links, its really a shame.
You can be sure that this will happen with asian characters along with Farsi, Hebrew, Arabic and all non-ascii characters.
Programmatically, what happens is as follows:
1. A program converts a filename from unicode to ASCII to save it in the .lnk file.
2. If the file name contains non-ASCII characters, those will be converted to NULL character.
3. When the shell tries to resolve the link target it does not recognise the filename because some characters are NULL.
Thats what I found out!!
Take this file name for example (Arabic): 2مرحبا.mp3
Try to solve the issue, and please inform us whatever happens with you..
Best Regards,
Mohammad
So the problem is how to get the shell to read unicode in lnk files. I re-wrote a lnk file in unicode to see if it would work but it would not. There are a lot of non english ppc users, surely this problem has come up before?
As an experiment I also made shortcut to a folder using utf-8, I think that contains arabic characters and also the ascii characters. After removing some garbage that my editor put at the front of the lnk file worked fine. Try making a shortcut in notepad and saving it as a utf-8 file then rename it on your device but make sure there is no extra characters.
أنا قادر على أكل الزجاج و هذا لا يؤلمني. -- I think those characters are arabic and they are copied of a utf-8 table site so if the shell can read a utf-8 lnk that contains english letters then maybe it can do the arabic too.
Actually, non English UNICODE characters are translated in to extended ASCII codes (128 - 255). When the system needs to translate these codes back to UNICODE it relies on code page definitions in the wince.nls file.
If your locale is properly set to Arabic and you have a valid nls installed (ether you have Arabic ROM or some sort of Arabic language support installed) you should be able to reference Arabic file names using ASCII links.
So, can I depend on string conversion functions we discussed before in this topic to convert characters according to my code page?
I have an arabic ROM installed on my Wizard, it is the i-mate rom on O2 device, so the arabizer doesnt work well, may be because the serial number of the O2 device.
Anyway, I should invistigate this issue on my friend's JamIn device, and we should come up with a workaround for this wiered problem.
Regards all,
Mohammad
OK,
I have tried creating a shortcut on my friend's arabic-enabled JamIn device, the shortcut refers to arabic-named file and it worked good.
levenum, you are right, it depends on the code page on each device, so your device will not be able to create a shortcut to an arabic named file.
Mohammad
Hi everybody.
This is a tip to change the language of office mobile 2007(6.1) from english(0409) to your own language.
FIRST:
Download the office update from micro$oft website:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=4b106c1f-51e2-42f0-ba32-69bb7e9a3814
Be sure to download your own language update file.
Example: If you want the Italian version you must download the italian update(code 0410 - Remember this code!)
SECOND:
Place the file in c:\(your hard drive).
Click on "run" shortcut and type msiexec /a c:\[the name of the officefile that you've downloaded] without the []
THIRD:
go to the folder named "Microsoft Office Mobile" in your root dir [in this ex. c:\]
and copy the cab file on your PDA.
note: remember to choose the right cab file. If you have a smartphone choose "office_smartfon" cab and if you have pocketpc choose "office_wpc" cab file.
QUARTER:
Install office update and soft-reset your PDA.
FIFTH:
Go to windows forlder( on your PDA) with file explorer.
Find: officeres.dll.0409.mui and rename it (ex. call it "pippo")
Find the same file in your own language (ex. officeres.dll.0410.mui for italian language where 0410 is the coutry code reference number - see microsoft website) in the same place. If you order file by name this is just one file down.
Rename it in: officeres.dll.0409.mui
delete the old file( in my ex. pippo)
SIXTH:
Do the same thing with the file called: "pptres.dll.0409.mui" and replace it.
SEVENTH:
Enjoy!! Now office is in your own language!
Remember to do a complete backup BEFORE change the language!!
Sorry for my bad english, I wish the mod "debug" my post
In second step when I run msiexec to unpack the msi file, it fails and i got an error says "Internal error 2203". Any hint for this?
i am a noob appareantly because i dont understand step two.
I did it. Instead of putting the msi file under c:\ , I put it somewhere else, e.g., c:\temp, and run the command from there then it runs successfully.
Thx, It Works!!! On My Touch Xl
Hi everybody out there!!!
I decide to start this thread, because many of us have same problems when try to translate a rom.
To start with something here is a basic procedure in translation:
- You have to change the MUI dll for one of your lenguage. I use a stock rom as base.
- Have to change the Initflashfiles.txt. Many "cookers" said to delete the first two bytes and save, other are not completly accord with that. I try both ways.
- Have to change the MUI and NUI values in registry
- Have to change the welcome.exe by the one in your base rom.
With this you can obtain a translated rom, but with no menor problems:
- Contacts doesn't open
- Phone doesn't open
- Many times the commanager doesn't work
Clearly I miss something (probably many things)
Hopping that the "Translators" of the forum can give us some advices or directions
Great initiative Humrod.
I'm hoping too that some Guru may help us.
Anyway i'm reserving this post as a memo of every steps i had to do to translate my current WWE ROM to a FR ROM.
Edit 30 Nov 2008
Here is the exact steps i use to translate the 3.07.707.02 Elfin WWE ROM to French.
I've use 3 Rom to achieve this goal
3.07.707.02 Elfin WWE (this is my base)
an Elfin French rom
a French shipped Diamond rom (from where i've taken the mui)
Ok, so hand on :
Extract the 3 ROMs
Remove all OEM\*0409 folder from 3.07.707.02
Remove all SYS\*0409 folder from 3.07.707.02
Copy the folder OEM_Lang_040C from any elfin french rom to the destination rom (you could also translate manually the rgu and provxml contained in the OEM_Lang_0409 folder).
Copy at least SYS\*040C folders to the 3.07.707.02 rom.
Cook, reboot! and voila your translated rom is ready.
Humrod, by following those steps you won't need to replace any programs or anything else... it's just working.
Good initiative Although I dont see this discussion device specific, so moving it to dev & hacking
ababrekar said:
Good initiative Although I dont see this discussion device specific, so moving it to dev & hacking
Click to expand...
Click to collapse
great Humrod! i think thid thread is gonna be very helpfull for all of us that have been discovering how to cook in other languajes than WWE with the metod of test and failure... maybe these thread even could have a link in the cooking class...
actually, i have made my custom room, ultra fast, but i've been trying to translate it into 0C0A, have everyhing done bt it doesn't boot...
@Ababreaker: im pretty sure humrod meant these thread for his elfin...
Very nice thread. A more detailed tutorial about the procedure will be nice too.
As for the apps that don't work, I beleive that the reason is the incompatible mui files from wm6 to wm6.1. I didn't have problems with any application in wm6, but in wm6.1 some apps like phone, messaging, task manager doesn't work. For phone app I descover that the tapres.dll mui file is responsible, and for messages I think that is the mms..something(I don't remember the name). And for others I think that is the shellres.dll mui file that does the main programs translations. So I think that these three, at least files(and maybe more) needed to translated again for wm6.1.
Hope these info will be helpful for you.
Yeah! dancer69 i think so that there are diferences between wm6 and wm 6.1
in fact one of the first thing i did was translate the MUI files. After tedious work it was not inoff. You have to change the soo too. The problem is when you want to upgrade the system.
Right know i think the right way could be to elect and share one rom to work togheter. I have a very clean Onix, very clean AB UC DXS 14.1 and for spanish speakers the Hto Ultra clean 6.1
BTW: I post it on Elfin because think is not the same on other devices, and we need to share comments with elfin translators.
First of all sorry for my english, i hope everybody can understandme....
Ok, i think it would be good to start with a little basics ("procedure") of translating the rom... off course modifications/corrections are welcome...
I think the tools we need are these:
- A good resource editor, i've try some of them, and IMHO, these are the best: XN Explorer (Freeware), and PE Explorer (Paid, 30 days trial)
- MSigner in order to sign the translated muis or anything
- Initflashfiles editor or simply use a text editor which doesn´t add the (un)famous two bytes to the files and change the .dat for .txt
- HV editor (This tool adds the double-slashes for directories in registry)
The last two tools often are part of kitchens, as Hyper Core (the one I use) or the Hybrid Kitchen
Ok, those tools are the ones that I´ve been using, if somebody wants to add more, well welcome...
I won´t go deep in the fact that you need to dump the ROM and get it into Packages... how this is made?, in this forum there are several threads about that, I recommend you this for excellence...
Once you´ve got the packages, notice that there are folders that have some of the following four caracters, depending on the original ROM language:
Code:
0401 Arabic ARA.MUI
0402 Bulgarian BG.MUI
041a Croatian HR.MUI
0405 Czech CS.MUI
0406 Danish da.MUI
0413 Dutch (Standard) NL.MUI
0425 Estonian ET.MUI
040b Finnish FI.MUI
040c French (Standard) FR.MUI
0407 German GER.MUI
0408 Greek EL.MUI
0409 World Wide English (WWE).MUI
040d Hebrew HEB.MUI
040e Hungarian hu.MUI
0410 Italian IT.MUI
0411 Japanese JPN.MUI
0412 Korean KOR.MUI
0426 Latvian LV.MUI
0427 Lithuanian LT.MUI
0414 Norwegian no.MUI
0415 Polish pl.MUI
0416 Portuguese (Brazil) Br.MUI
0816 Portuguese (Standard) PT.MUI
0418 Romanian RO.MUI
0419 Russian RU.MUI
0804 Simplified Chinese CHS.MUI
0c0a Spanish (Modern Sort) ES.MUI
041b Slovak SK.MUI
0424 Slovenian SL.MUI
041d Swedish SV.MUI
041e Thai TH.MUI
0404 Traditional Chinese CHH.MUI
041f Turkish TR.MUI
and more....
- Yes, you must rename those language codes of the folder name, with the one you want to translate the ROM into. And inside of those folders, there will be some files with extension .mui (I´m assuming you know what these MUIS are, if not: Wikipedia). These files have the language code in their name, and yes, you must replace (NOT RENAME) them with the correspondent in your language but... Where you get them? you can translate them one by one , or you can get them one by one from a dumped ROM in your language ... or just download them from this thread, fortunately they post all the needed MUIs and help html´s of several languages, so you can get it from there.
- Once you've collect them, all you have to do (an this is the tedious part), is look every folder of the "target" ROM and find in which folder goes each mui and place them there...
There will always be some mui or dll that you can´t find in your language, so the only alternative is to translate it yourself:
- Open the resource editor of your choice (links above), find the MUI and translate everything you see that can be translated... Save it (dah!)
- You must Sign the file or it won´t work at all...whit Msigner (link above) you can do that.
- That´s all with the translation thing...
I think this post is too big, so i´ll continue in the next
- Now, you have to modify a file named initflashfiles.dat (look for it in folder OEM_Lang_XXXX inside SYS), This initflashfiles.dat contains and creates all the addresses to all the folders that exist in the ROM. Just use the Initflashfiles Editor (links above) and follow the instructions.... You must carefully translate what you need to translate (like My Documents, My Music, Program Files, etc. I recommend you not to translate folders like Application data, or System, or some folders inside Windows...) It is very important to remember or write down what changes you´ve made, because you will need them in order to modify the registry... Follow the instructions of the Initflashfiles Editor or the Editor of your preferred Kitchen. Return it to SYS/OEM_Lang_XXXX
- The next thing to do is modify the registry....there are several parts of the registry in different places of the ROM folders, there are three types of files we´ll modify: user.hv and default.hv, all of the .rgu inside any folder and all of the .provxml inside any folder.
- Default.hv and User.hv: these are the main parts of the registry, you can find them inside the folder SYS/Metadata. Modify them with HV Editor (links above) and follow instructions, remember to save in Unicode and add the word REGISTRY4 at the beginning of the file and a blank line at the end (just follow the instructions of the Editor). What you need to change is all reference to all the folders with the information that you already change in initflashfile.dat, and many other information you see you can translate.
Use the find tool to find all reference to the "Original ROM Language Code", and replace it with the "Target ROM Language Code", don´t do "Replace all" because there are CLASS´s or strings that can contain those numbers and have nothing to do whit language.... (THIS GOES TO .HV, .RGU AND .PROVXML). Look especially for:
Code:
[HKEY_LOCAL_MACHINE\MUI]
"Enable"="1"
"SysLang"="0409" (for example, you don´t have to use necessary 0409 English...)
[HKEY_LOCAL_MACHINE\System\Autoupdate]
"ClientLCID"="0409"
[HKEY_LOCAL_MACHINE\nls]
"SystemLCID"="0409"
"DefaultLCID"="0409" (Tip: This entry modifies the "Regional Setting" country of your choice see [URL="http://msdn.microsoft.com/en-us/library/ms834426.aspx#locplatform30_codepages"]here[/URL] for detail)
[HKEY_LOCAL_MACHINE\nls\overrides]
"LCID"="0409" (Tip: This entry modifies the "Regional Setting" country of your choice)
[HKEY_CURRENT_USER\MUI]
"CurLang"="0409"
I can´t tell you what exactly to change or translate, because you´ll see how big the registry is (yes, it will take a long time to edit it), all i can is give you some tips:
- Find strings like @="Something", usually these are Titles or Names, or strings like Nm="blahblah", BUT NOT ALWAYS, be carefull...
- Find descriptions, like "Audio File" or "Google Maps KMZ", BUT NOT ALWAYS, be carefull...
- References to folders (did you write down the changes you made in initflashfiles.dat? i told you to...), be sure that all references to folders have double backslashes (\\) like ...="\\Windows\\animated.gif"
- Do not change nothing if you´re not sure, better ask before re-do everything again.
Once you modified those hv´s, follow the instructions to save them, and return them to SYS/Metadata.
- .rgu files: you´ll find them in almost every folder in the Packages! In OEM and SYS, but not all of them contains things you can translate, you must open each one whit Notepad, DEACTIVATE "Word Wrap", and look carefully, in many cases, strings you already translated in the hives (default and user.hv), need to be translated here again. I don´t recommend you to just to erase them from the hives or the rgu, at least you´re pretty sure what you´re doing.... Follow the tips of the hives as well.... And when you´re done, SAVE AS UNICODE (generally these files are protected, so you must modify this attribute before you can save it).
- .provxml: these are just XML files, and usually have the language code in the name change it. You can edit it with notepad, and save as UNICODE. Same as above....But!... is not necessary to add double backslash in the folder references...
Ok, that´s it but not all... you need to change some files like welcome.exe, notes.exe and others that can come out dependig on what you´re including in your ROM...that´s the reason of this thread!!
Well, i hope this would be usefull people.
Remember, any correction/suggestion/modification are very welcome....
Happy cooking!!
Thanks jonbus for this tutorial... some very valuable tips, i'm sure lot of people will appreciate.
Anyway, jonbus don't you have to make others modifications like CLSID in registry too?
In my current WWE to French rom translation, i'm facing a strange situation where some programs do not work note.exe, phone (cprog.exe) and contacts but the rest of the ROM is fully functionnal...
EDIT :
Ok you've edited so i'll edit too
For the French translation :
There is no need to change welcome.Exe
You must change note.exe
Don't know what to do for the phone to work
Don't know what to do for the contacts to work
Demo[95] said:
Thanks jonbus for this tutorial... some very valuable tips, i'm sure lot of people will appreciate.
Anyway, jonbus don't you have to make others modifications like CLSID in registry too?
In my current WWE to French rom translation, i'm facing a strange situation where some programs do not work note.exe, phone (cprog.exe) and contacts but the rest of the ROM is fully functionnal...
EDIT :
Ok you've edited so i'll edit too
For the French translation :
There is no need to change welcome.Exe
You must change note.exe
Don't know what to do for the phone to work
Don't know what to do for the contacts to work
Click to expand...
Click to collapse
Yes off course! in CLSID you will find references to folders (CSLID are identifiers, so they must refer to some archive in some moment..) as I said, it´s a tedious thing to modify registry, is waaay to big...you have to be extra-careful and have your eyes wide open 8)
About those files...yes that strange, changing welcome.exe and notes does not work in all ROM, dunno why...anyway, you can check it with a resource editor to see whats inside it, just for curiosity...
For phone and contacts, have you try to replace tapres.dll? because not always we can find their respective mui file (tapres.dll.xxxx.mui)... or try to find the mui....
Good luck!!
Hola jonbus, good tutorial!!
we can talk in Spa, but for the others in forum, you know
I'm not sure about the chage of the MUI files. I made some experiments and after change, the lenguage is still english (in my case). When i cook in prophet, this works perfect, but in Elfin......so so.
Ok. I'm in the same situaction of Demo95: I have a full working translated rom but for the phone and contacts. I resolve the phone issue, by change not either the phone related files, but the com manager too, but for me this solution is not too good, because the result is a rom partially actualized.
As first conclusion is evident that some in the system related for this files is imcompatible with the lenguage in change and I'm focused now in the Xip.
In case of some results i will post it here.
I think that the problem is the specific mui files, that maybe are for a different version of these applications. I don't know much about cooking but I have more experience in mui translations. I suggest to make a translation of these mui files(maybe a part of them just for testing) from the original english rom's files and copy them to device to test them on the fly.
Don't forget to unsign and resign them before use them(and be sure that the signing is successful). For phone application I've found that the mui is the tapres, witch I think it haven't a lot of strings for translation.
the way I do it is like this..
I download a shiped rom in the language any device will do. Then I dump that rom and then just use all the folder that end with _0XXX (_040C is french) copy them to my rom. now most of the things will work out of the box.
now you will mostly only have to work within the OEM_Lang_0XXX because thats where the most customacation of the device is done. Initflashfile.dat and the .rgu are what would be needed some changes but in many cases Initflashfile will work without editing. the rgu has the button mapping.
also there is a oemTranslate.xml or HTCtransulate.xml (might be spelled wrong don't have a kitchen here) this one translates the backlight deviceinfo and such into the right language. ther might be some missing or some to many in there if you used a shiped rom for an other divices.. and can cause a blank icon in settings/system.
What I did with my multilanguage roms.. I copied all the lang files into the same kitchen and made Option.xml files for all of them.
excample:
Code:
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<Items>
<Item name="French" group="Language" checked="False">
<Tip></Tip>
<Guid type="p">76129d77-24e3-493f-b0fb-597ed4c04c6d</Guid>
</Item>
</Items>
you need to add a Guid type line with the number of all dsm files that are related for that language in this case french. now make a new txt document and save it as unicode and name it package.dsm you can do this to as many languages you like.
place the Option.xml and package.dsm file in a folder for them self one for each language.
this methot can also be used when making several roms lets say Full, medium and small.
I used the offical kaiser roms to make the multiroms but they don't work on some of the newer builds where I had to use language files from diamond.
hope this will help someone
humrod said:
Hola jonbus, good tutorial!!
we can talk in Spa, but for the others in forum, you know
I'm not sure about the chage of the MUI files. I made some experiments and after change, the lenguage is still english (in my case). When i cook in prophet, this works perfect, but in Elfin......so so.
Ok. I'm in the same situaction of Demo95: I have a full working translated rom but for the phone and contacts. I resolve the phone issue, by change not either the phone related files, but the com manager too, but for me this solution is not too good, because the result is a rom partially actualized.
As first conclusion is evident that some in the system related for this files is imcompatible with the lenguage in change and I'm focused now in the Xip.
In case of some results i will post it here.
Click to expand...
Click to collapse
Claro Humrod!
I agree with you about a ROM partially actualized, but, that´s the reason , i presume, for the malfunction or incompatibility of the MUIs, probably the are several differences betwen an update and another...
dancer_69 said:
I think that the problem is the specific mui files, that maybe are for a different version of these applications. I don't know much about cooking but I have more experience in mui translations. I suggest to make a translation of these mui files(maybe a part of them just for testing) from the original english rom's files and copy them to device to test them on the fly.
Don't forget to unsign and resign them before use them(and be sure that the signing is successful). For phone application I've found that the mui is the tapres, witch I think it haven't a lot of strings for translation.
Click to expand...
Click to collapse
Well, as i told yu, the tapres did the job! Yes that´s what we must do, translate the muis that are giving problem...
gullum said:
the way I do it is like this..
I download a shiped rom in the language any device will do. Then I dump that rom and then just use all the folder that end with _0XXX (_040C is french) copy them to my rom. now most of the things will work out of the box.
now you will mostly only have to work within the OEM_Lang_0XXX because thats where the most customacation of the device is done. Initflashfile.dat and the .rgu are what would be needed some changes but in many cases Initflashfile will work without editing. the rgu has the button mapping.
also there is a oemTranslate.xml or HTCtransulate.xml (might be spelled wrong don't have a kitchen here) this one translates the backlight deviceinfo and such into the right language. ther might be some missing or some to many in there if you used a shiped rom for an other divices.. and can cause a blank icon in settings/system.
What I did with my multilanguage roms.. I copied all the lang files into the same kitchen and made Option.xml files for all of them.
excample:
Code:
<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<Items>
<Item name="French" group="Language" checked="False">
<Tip></Tip>
<Guid type="p">76129d77-24e3-493f-b0fb-597ed4c04c6d</Guid>
</Item>
</Items>
you need to add a Guid type line with the number of all dsm files that are related for that language in this case french. now make a new txt document and save it as unicode and name it package.dsm you can do this to as many languages you like.
place the Option.xml and package.dsm file in a folder for them self one for each language.
this methot can also be used when making several roms lets say Full, medium and small.
I used the offical kaiser roms to make the multiroms but they don't work on some of the newer builds where I had to use language files from diamond.
hope this will help someone
Click to expand...
Click to collapse
I´ve made that in a couple of rom i cooked, i leave two or three folders OEM_LANG and so, but obviusly it was a big rom....and not only those folders need to be changed, inside every OEM package sometimes you can find some language files, not only Muis, but dlls and exes, just like the case of welcome.exe (tapres.dll has its own Mui), and, not always you can find an oficial rom in your language, and if you use two different updates of diferent languages there´s not always compatibility, thats what happen with these 3.07 and 3.10...
I´ve use two of your roms and they were awsome! specially the manila2d
Lets keep on it and see how to figure it out!
P.D.
In htc.com, we can find the update but you must type your device serial, i don´t know why mine doesn´t work, maybe there we can find the oficial update in our language....has somebody tried?
jonbus said:
In htc.com, we can find the update but you must type your device serial, i don´t know why mine doesn´t work, maybe there we can find the oficial update in our language....has somebody tried?
Click to expand...
Click to collapse
I've tried but it didn't work for me too... It's simply because HTC block phone serial that have been sold by a provider... I've tried to find the last originale rom on GOOGLE but without success..
Hi gullum, i'm follow your work since I was on a prophet, and learn a lot.
About your comment: you change the hole file or just the mui inside?
is possible to create a mui for a file that originally haven't?
seems that this tread is for our interest only.....
we can continue by PM...
Well it seems nobody care....
Anyway i guess i've finally found a way to completely translate from WWE to French; I haven't enought time to explain how i did it right now but will write it down tomorrow.
Ok sounds good, I'll be expecting
humrod said:
Hi gullum, i'm follow your work since I was on a prophet, and learn a lot.
About your comment: you change the hole file or just the mui inside?
is possible to create a mui for a file that originally haven't?
Click to expand...
Click to collapse
It's possible if the program supports mui translation. You can rename an exe or dll file to exe.0xxx.mui or dll.0xxx.mui and translate all strings in another language. I have done this with resco explorer 6 with succsess and some other apps that I don't remember the names.
Dear Colleagues,
I'm trying to cook a ROM in Polish. I have handled almost all the translations, but I have a problem to find the place to translate Soft Keys when a system menu is used (see my screenshots). On the bottom there is still written "Close" and "Back" instead of Polish wordings.
These softkeys appear in many programs like File Explorer, pOutlook, Office applications, Notes, Windows Calendar, Windows Contacts and some others even though for each of these applications I have a proper *0415.mui files (found or edited myself), and all every other text in these applications (also menu items) is correctly translated.
It seems like there is some mui file, or reg entry which covers general menu appearance and texts but I cannot find it. I searched all my mui files for "Close" and "Back" strings (ASCII, Unicode and Hex) with Total Commander but without any outcome. Also searched in the registry of a cooked ROM for these strings. Also without results.
Does any of you guys have an idea where can I change these strings? Or do you have an idea how else can I search for them?
The sys build is: 21887, perhaps this is an important information.
Thanks in advance
Skrobel
CUIHandler.dll.<yourlang>.mui
(Menu Enhancement package from HTC)
OndraSter said:
CUIHandler.dll.<yourlang>.mui
(Menu Enhancement package from HTC)
Click to expand...
Click to collapse
Thank you very much!
But I have the file, it's translated and signed. It has only 3 string resources 102 (Back), 104 (Close) and 105 (Redy), but all three I do already have in my 0415 language (and of course all resources are marked as 1045). But the SoftKeys in menu still appear in English...
These two (three) Back&Close&Back are from this file, I know it, I translated it many times from chinese ROMs. Are you cooking the right file?
I hope so... In the original package there was no 0409.mui so I don't even know if the IDs have chaned. I took the 0415 mui from the stock ROM 21887 stock ROM.
And honestly I don't have influence on the package itself 'cause I work on dump not the full kitchen system.
EDIT: Ah, perhaps this helps: The menu enhancement package version is: 1_1_20191232_00 perhaps somebody of you has the correct 0409 or even chinese mui file for exactly this package?
EDIT2: I viewed the CUIHandler.dll with HexEditor. But I couldn't find there any of above mentioned strings even in English. Since there is no english nor chinese mui file for this library, I don't know where the system finds the strings afterall. Strange.
I've asked the original ROM Author - Jackos - for sending me the Menu_Enhancement packages. And here it is:
http://forum.xda-developers.com/attachment.php?attachmentid=404044&d=1284905153
As you can see, no mui files. But somehow the system still knows what to write in English...
Do you have any more ideas how to force these three words to appear in another languages?
Sorry I'm an ass, I said correct package (Menu Enhancement), but wrong file, I ment HTCMenuEnhance.dll.<yourmui>.mui
Sorry once again
Ahoj!
OndraSter, you are not an ass You're brilliant!
I just renamed my original CUIHandler.dll.0415.mui into HTCMenuEnhance.dll.0415.mui and it worked at last!
Actually I copied the file not renamed it as TC couldn't remove file "in ROM". But the most important thing is it works!
Now I started to wonder why!
Is it possible, that when one doesn't use Menu Enhancements these 3 strings are controlled by CUIHandler, and if one uses Menu Enhancement this function is "overtaken" by HTCMenuEnhance.dll?
Dou you have somewhere in your archives a HTCMenuEnhance.dll.xxxx.mui file from any other Menu_enhancement package (any language - even chinese or Czech)? I just wan't to check if there are no other strings that should be there. And I don't know how to create a mui out of whole dll (where to look for the resource IDs).
Zatím děkuji
Skrobel
These menus are "enhanced" by HTC, making dll CUIHandler.dll (forced name by MS) and enabled in registry. HTC has in latest versions of Menu Enhancement renamed the dll to HTCMenuEnhancement.dll, that's the all problem here, the string table is the same, just 3 recods (Close&Back&Close I think). Same as for original (old) CUIHandler iirc.
Thanks again, I am happy now. Problem solved!
OndraSter said:
These menus are "enhanced" by HTC, making dll CUIHandler.dll (forced name by MS) and enabled in registry. HTC has in latest versions of Menu Enhancement renamed the dll to HTCMenuEnhancement.dll, that's the all problem here, the string table is the same, just 3 recods (Close&Back&Close I think). Same as for original (old) CUIHandler iirc.
Click to expand...
Click to collapse
Hi Ondra
Thank you very much, I was lookinf for this for ages
Díky Ondro
Tohle jsem hledal a dnes během hledání jiné věci našel.
THIS GUIDE IS FOR PEOPLE THAT KNOW WHAT ARE DOING! DO NOT TELL ME THAT I BRICKED YOUR PHONE OR STUFF LIKE THAT, YOU ARE RESPONSIBLE OF WHAT HAPPENS TO YOUR PHONE, BE CAREFUL!
I wrote this guide studying the system of Motorola Droid 3, but it is good for nearly every phone, (or single application!!), maybe with advent of android 4.X this is becoming useless, because usually every rom has already all languages into it, but you could use this even for correcting translations, or translate yourself some application
If you want the Italian versions of Minimoto 1.7 and MavROM 4.5 go to this thread: http://forum.xda-developers.com/showthread.php?p=47857497#post47857497
Every Droid 3 owner out of the English/Spanish area knows that every D3 ROM comes out with only two languages preloaded in it, right? well...if you know well english (or spanish!) maybe i have something for you!
Ok, i hope this guide could be helpful to everyone like me that wanted to find a non-english, non-spanish Gingerbread ROM for Droid 3.
After some studies, and a lot of searching too, i've found the best (i think) way to translate roms. Oh and this guide is good for every android phone out there! Let's start!
Part 1 - Download all the stuff! (plays Monkey Island music )
Our needs are very few, what you need with this is a lot of patience, and knowing some english could help.
- A rooted Droid 3 (or any other phone)
- The ROM you want to translate
- WinRAR / 7-Zip
- Notepad / Notepad++ (Highly recommended!!!) http://notepad-plus-plus.org/
- Java Development Kit www.java.com
- APK Manager/APK Multi-Tool, since now i will call them APKM and APKMT ( i used APK Manager, but multi-tool should be fine anyway) http://apkmultitool.com/?q=node/5
- Google Translator Toolkit http://translate.google.com/toolkit/
- Safestrap (optional, but very, very recommended)
- MoreLocale2 or another language changing program
Note 1: If APK Manager/Multi-Tool bother you with something about java not found do this: http://wiki.answers.com/Q/How_do_you_stop_the_error_%27java%27_is_not_recognized_as_an_internal_or_external_command_operable_program_or_batch_file
Note 2: In APKMT, the commands are a little different from APKM, e.g. in APKM the "set project" command is listed as 22 and in APKMT is listed as 24....the functions we'll use are the same, just read the description if you're not sure and you'll be fine
Ok, let's take the stuff out of the box!
Part 2 - The extraction point
Open the .zip containing your ROM's files with WinRAR / 7-Zip and extract the folder "system" somewhere (i recommend to create a folder for your translation project) once the process is done, we can basically do two things: Decompile the apps or decompile the frameworks, the process is the same, but you have to go really really REALLY careful with framework apks, or once you flashed the ROM what you've got is a translated BOOTLOOP. So be careful. With apps you can mostly screw a functionality up, like SMS or Phone, but nothing too messy.
Anyway you can solve the problem with a new flash with the corrected ROM, or the original, untranslated ROM.
Ok let's start with the frameworks: we've usually got 3 differents frameworks and those are
framework-res.apk
blur-res.apk
moto-res.apk
Those apks contain mainly everything written all around the phone, like pop-up messages, status bar, app permissions and a lot of other stuff.
We'll use framework-res.apk.
If there isn't, create a folder in the same folder where you have installed APKM/APKMT, called "place-apk-here-for-modding" without quotes, then copy inside it the framework-res.apk.
Now you have to open the Script.bat file, and once you get into the main window, digit 22 (APKM) or 24 (APKMT) and press enter to select the current project, now digit the number corresponding to the desired apk (it should be 1 if you have only framework-res.apk) and press enter. now digit 9 (APKM/APKMT) and enter and you'll decompile the apk. Now you should have a folder, inside the "projects" folder of APKM/APKMT named just as the decompiled apk. Inside it, you'll find a folder called "res" open it and you'll be right into the core of the translation:
Note: if you get an error after decompiling, try with option 10 (APKM/APKMT), and drag and drop the necessary framework over the prompt when APKM/APKMT ask, press a key, and if you get another error try with another framework (D3 has 3 of them) until you get the job done. If nothing works, probably there's a problem with the apk you want to decompile.
Note 2: You could need to have frameworks installed into folder C:\Users\YourPCUSername\apktool\framework. You can do this either with apktool via cmd or manually copying the 3 frameworks into this folder (create it if needed) and renaming them this way:
- framework-res.apk => 1.apk
- moto-res.apk => 2.apk
- blur-res.apk => 3.apk
Then you should be able to decompile 99% of apks with option 9.
You'll find a bunch of folder, but we are interested in the "values" ones, if you have to translate the app, you'll see something like this:
- values
- values-es
- values-es-rUS
the first folder contains the english files, the second contains the spanish files, and the third contains some other files for spanish variants.
Open the "values" folder and inside it there are some .xml files, we will always use only 3 of those at most:
- strings.xml (the file containing mainly all the text strings of the apk, if you find this, then you have to translate it, if not, just pass over this apk, it doesn't contain text)
- arrays.xml (the file that contains some text data for drop lists, you'll not find this often, but if you find it, translate it)
- plurals.xml (the file that contains plural words, this is very rare to find, but if you want to make good translations, then, translate!!)
Now get back to "res" and create a folder called "values-xx" where xx is your language code, for example i made a values-it folder, but you'll write values-fr, values-de, values-idunno etc.
You'll put here, all the XMLs we're gonna translate now!
Part 3 - Bring out the dictionary!
The game is getting harder, now you have to use your better weapon: Google Translation Toolkit. But first, let's look into XML!
Open the "strings.xml" file with Notepad++, and look at the records structure:
<string name="aerr_application">The application %1$s (process %2$s) has stopped unexpectedly. Please try again.</string>
You have to change ONLY and i repeat ONLY the text between "<string name="aerr_application">" and "</string>"!
Now some rules:
- See that "%1$s" weirdness? that is a jolly word that Android replace with a variable data, in other words DO NOT TOUCH IT! just imagine that you'll see there something like "The application *Temple Run* (process XYZ) has stopped etc. etc.
- If you have to put an apostrophe or some other weird character, always put quotes at the beginning and at the end of the string just like in the translated string down there, it's good to always put them, And GTT (Google Translator Toolkit) does that.
- If the string you have to translate looks like code stuff, probably you should leave it untranslated, something like:
<item>@string/resolutionSummaryWideScreenTV</item>
<item>MOTOCAMSETTING_REVIEW_TIME_4_SEC</item>
see? DON'T TOUCH IT! BAD TRANSLATOR! BAD!
This is the resulting, translated string:
<string name="aerr_application">"L'applicazione %1$s (processo %2$s ) si è fermato in modo imprevisto. Si prega di riprovare."</string>
Ok, now we can translate without detonating the phone, but framework-res has something like 1300 rows of text!
WHOA! let's use GTT!! http://translate.google.com/toolkit/
Once you are on the main screen of the tool, click on the red "Upload" button on the upper left, then in the page you found after, click on "Browse..." and select your file inside your PC.
Set all the stuff down there, like the name, the language and everything else, and click "Upload for translation"...here comes the magic...
The XML is translated! sort of...
You now have to look if GTT has done the work well...let's look into this page:
- You can see that now the entries are divided in boxes, you can click onto the left panes' boxes and edit the content.
- Play a little with the interface, you have to get familiar with it if you want to translate a ROM!
- Look to spaces and returns, GTT mess them, and you should correct the format.
- Text is coloured: i'll tell you what those fancy colours ACTUALLY mean
- Orange: this means you've edited the text into the box
- Red: text coloured in red came right out of Google Translate, and 70% of times, it will be gibberish, so look carefully into it, this will be the work where you'll spend more time.
- Blue: this is a sneaky bastard, it says that he found a "100% matching" translation in his database, but it has a 30% chance to be total nonsense, be careful with it.
- Green: this colour is fine, you probably have translated this in past, or someone did it for you, anyway, it will be 99% correct, if the past translation was correct.
- Brown: this happens rarely, usually where it founds a colon (the symbol ":" ok?? :angel: ) and for some reason, it goes random, usually you need a very little effort to correct it.
- Purple: THIS is a funny one. when purple comes out (usually with a wildcard character like "%1$s") the translator often goes TOTALLY random and write some idiocy. rewrite the text from scratch.
Once you've managed to translate everything, and if you're sure to have completed everything, click (if you want) on "Complete" in the upper right corner of the page, and then we need to download our work, to do that, click on "File" (upper left) and then "Download". Save the .xml file in your values-xx folder, and check one last time with Notepad++ the number of lines, the spaces and the format in general, at this point we're ready for the final part!
Part 4 - Repack everything!
Now the situation is this: you have the "project" folder containing all the decompiled apks folders, with the "values-xx" directory in it, we now have to recompile everything and put apks into the ROM. Let's see how:
- Open APKM/APKMT and select the project you want to recompile
- digit 11(APKM/APKMT)
- Look if you got errors, if yes, look into the log 20(APKM) or 23(APKMT) and see what the problem is, if you look carefully you will identify where is your error log, probably it's a messed tag, or something easy to resolve, correct the issue, and go ahead, restarting from digiting 11 (Compile)
- Press Y and enter
- Press Y and enter (yes, 2 times)
- Now wait for APKM/APKMT to stop spitting lines out and it'll tell you something. Read it, but the substance is: go in the APKM/APKMT folder, look for a "keep" directory, delete the "resource.arsc" file, get back on the APKM/APKMT prompt window, and press a key.
- Once everything is completed, you now have a file called unsignedframework-res.apk (or unsigned*nameoftheapkyouhavecompiled*.apk)
- The next, is the point i still didn't get, but it works...maybe XDA guys can explain better this...anyway, we now have to sign apks...i saw that this shouldn't be necessary, but otherwise i've got a lot of errors and force closes and stuff like that...soooo, at least for D3, sign it!
- We have 2 choice for signing...if you have only a few apks to decompile, you can just select the project and digit 12(APKM) or 13(APKMT) and sign it but if you have translated a whole ROM and you want to sign all the apks at once, create, if not exists, a folder called "place-apk-here-for-signing" and put all the unsigned apks there...you now have to digit 16(APKM) or 18(APKMT) and the apks will all be signed automatically.
- Rename the apks removing the "signed" part from the name.
We're now ready to pack the ROM: i usually create a "system" folder somewhere else that i will put directly into the ROM's zip, but you can do it by hand (boring). I'll show you my method for now:
- create a "system" directory
- inside it, create a "framework" and an "app" folder
- put into the framework one, all the frameworks (easy, huh?) and into the app directory, put all the other apks.
- open the ROM zip and drag and drop the system folder into the ROM in order to overwrite the existing one.
Our freshly translated ROM is ready to be flashed and brick or burn your phone! (ok, no, this is not true...maybe...)
Anyway, download the zip on your phone and flash it with the recovery you want.
I RECOMMEND TO DO THE FIRST TEST ON A SAFESTRAP, AND ONLY IF YOU'RE SURE THE ROM IS SAFE, INSTALL IT ONTO YOUR MAIN SLOT! I'VE WARNED YOU!
Part 5 - Polish your creation!
When the ROM is installed, and if it boot correctly, First install MoreLocale2 or other similar apps, and add, your language, with the correct ISO codes and look around to see if something is untranslated...if yes, go back, to APKM/APKMT and find the apk you need to modify, translate, repack, flash the ROM and again until you've got a perfectly translated ROM!
The tutorial is ended, i hope you liked it, and if you want to correct, critic, ask, or anything, just tell me!
Tips: If you want to avoid the MoreLocale stuff, you can edit the build.prop, into the folder "system" of the ROM you'll find this file, open it with Notepad++ and look for these lines:
ro.product.locale.language=xx
ro.product.locale.region=YY
You have to put here your ISO language code, but i noticed that on D3 it doesn't always works...so, try but i don't guarantee success.
If i remember something, i'll integrate the post
Coming Soon:
Screenshots!
Corrections!
Test reply (i can't see the thread in the forum) It's fine now