Tutorial on how to translate Unity games?
-
- Posts: 5
- Joined: Sat Jun 18, 2016 5:36 am
Tutorial on how to translate Unity games?
Dear ZenHaxers, is there any tutorial about how to translate Unity games out there?
I found a lot of resources to reverse engineer / unpack Unity files, but no organized step-to-step tutorial to localization or sub translation.
Do you know of something I can study?
I know every game's different, but the approaches, workflow and steps should be more or less the same.
Thanks guys!
I found a lot of resources to reverse engineer / unpack Unity files, but no organized step-to-step tutorial to localization or sub translation.
Do you know of something I can study?
I know every game's different, but the approaches, workflow and steps should be more or less the same.
Thanks guys!
-
- Posts: 69
- Joined: Sat Dec 05, 2015 2:31 pm
Re: Tutorial on how to translate Unity games?
In Hungary we have a meeting for translators, and we've just held the 2nd one. Unfortunately I couldn't attend, but I've made a video regarding the matter. I could show you the video, but it's in Hungarian language.
Regardless of that, here's what I've made:
BASIC RULES OF A TRANSLATION:
1. Always make a copy/backup of your files in case you mess something up.
2. Find a very simple part of the game (like the main menu, options, the first text you see...etc) and edit that one to see if you can edit the text or not.
3. Try to change one letter (like "Play" could be changed to "Plai" or anything, maybe "Exit" or "CooL"...etc), and see if you change it then it also changes in the game (and can the game be run at all)
4. Try writing shorter or longer text ("Go" instead of "Play", or "Start", because one is shorter and one is longer), and again, see if the game still works
5. Try out special characters. Because I'm Hungarian, I try out my unicode characters to see which ones work and which ones doesn't (like "íéáőúöüóű").
That covers the basics, let's see how I translate these games:
1. Start the game, and look for an easily editable and viewable text (like the one I've mentioned above, the "Play" one)
2. Exit the game, and open ALL .assets files in Notepad++ (the text could be in resources.assets, sharedassets0.assets or sharedassets3.assets, but I've seen some different results)
3. Now CTRL-F and search your text in all documents. Some documents should pop up and you can see if it contains said text or not. If nothing is shown, then maybe you need to choose a different text and search for that
4. After you've found out where it stores your stuff, then open up that .assets file with UnityEx. By using it, you can extract all files in a folder.
5. Open said folder and open all files in Notepad++, and search for your text. It should give out one file, maybe with a weird extension (like -5, -49, -52...etc).
6. Edit said file and save it, then import it back in with UnityEx.
7. Start the game, see if it works.
If by any chance it doesn't work, then maybe the game has pointers assigned to it. Pointers can be edited with HEX Editors (like HEX Workshop), and they determine how long a certain text can be. If you open up a file and look around it's bits and bytes, you should see something like this: "0004000something". Those 0-s divide the text in the file, and that 4 is a value which determines how long the next text segment will be, which is "Play" in our case, and that's 4 character long.
That's all for today, don't know what else you need, but if you have any questions feel free to ask.
Also I know you've posted like a month ago, but I do hope you are reading these forums and that this little tidbit of text will be helpful for you (or for anyone else)
Regardless of that, here's what I've made:
BASIC RULES OF A TRANSLATION:
1. Always make a copy/backup of your files in case you mess something up.
2. Find a very simple part of the game (like the main menu, options, the first text you see...etc) and edit that one to see if you can edit the text or not.
3. Try to change one letter (like "Play" could be changed to "Plai" or anything, maybe "Exit" or "CooL"...etc), and see if you change it then it also changes in the game (and can the game be run at all)
4. Try writing shorter or longer text ("Go" instead of "Play", or "Start", because one is shorter and one is longer), and again, see if the game still works
5. Try out special characters. Because I'm Hungarian, I try out my unicode characters to see which ones work and which ones doesn't (like "íéáőúöüóű").
That covers the basics, let's see how I translate these games:
1. Start the game, and look for an easily editable and viewable text (like the one I've mentioned above, the "Play" one)
2. Exit the game, and open ALL .assets files in Notepad++ (the text could be in resources.assets, sharedassets0.assets or sharedassets3.assets, but I've seen some different results)
3. Now CTRL-F and search your text in all documents. Some documents should pop up and you can see if it contains said text or not. If nothing is shown, then maybe you need to choose a different text and search for that
4. After you've found out where it stores your stuff, then open up that .assets file with UnityEx. By using it, you can extract all files in a folder.
5. Open said folder and open all files in Notepad++, and search for your text. It should give out one file, maybe with a weird extension (like -5, -49, -52...etc).
6. Edit said file and save it, then import it back in with UnityEx.
7. Start the game, see if it works.
If by any chance it doesn't work, then maybe the game has pointers assigned to it. Pointers can be edited with HEX Editors (like HEX Workshop), and they determine how long a certain text can be. If you open up a file and look around it's bits and bytes, you should see something like this: "0004000something". Those 0-s divide the text in the file, and that 4 is a value which determines how long the next text segment will be, which is "Play" in our case, and that's 4 character long.
That's all for today, don't know what else you need, but if you have any questions feel free to ask.
Also I know you've posted like a month ago, but I do hope you are reading these forums and that this little tidbit of text will be helpful for you (or for anyone else)
-
- Posts: 1
- Joined: Fri Sep 08, 2017 3:28 am
Re: Tutorial on how to translate Unity games?
Hi! I' did exactly was you said, but the games seems like it's ignoring my changes...
-
- Posts: 1
- Joined: Mon Sep 11, 2017 11:08 am
Re: Tutorial on how to translate Unity games?
Renan Rischiotto wrote:Hi! I' did exactly was you said, but the games seems like it's ignoring my changes...
Same. I guess that means I should try it again.
Last edited by Bobby Moore on Tue Sep 12, 2017 6:30 am, edited 1 time in total.
-
- Posts: 165
- Joined: Wed Aug 13, 2014 10:00 am
Re: Tutorial on how to translate Unity games?
Renan Rischiotto and Bobby Moore,
You have to be more precise. Like what you did and what game you tried to translate.
You have to be more precise. Like what you did and what game you tried to translate.
-
- Posts: 6
- Joined: Wed Nov 15, 2017 6:29 pm
Re: Tutorial on how to translate Unity games?
The_Reaper_CooL wrote:6. Edit said file and save it, then import it back in with UnityEx.
7. Start the game, see if it works.
Im lost myself at this point, how im supposed to import it back?
-
- Posts: 165
- Joined: Wed Aug 13, 2014 10:00 am
-
- Posts: 6
- Joined: Wed Nov 15, 2017 6:29 pm
Re: Tutorial on how to translate Unity games?
The problem is that the bar is always green and pressing import dont do nothing
to be clear i have pressed: view game object-export-modified some text in the file and now i trying to import it back
thank you for the help
to be clear i have pressed: view game object-export-modified some text in the file and now i trying to import it back
thank you for the help
-
- Posts: 165
- Joined: Wed Aug 13, 2014 10:00 am
Re: Tutorial on how to translate Unity games?
1) Open assets file
2) Export file you want
3) Edit it
4) Import file back in UnityEX
Nothing complicated
2) Export file you want
3) Edit it
4) Import file back in UnityEX
Nothing complicated
-
- Posts: 6
- Joined: Wed Nov 15, 2017 6:29 pm
-
- Posts: 6
- Joined: Wed Nov 15, 2017 6:29 pm
Re: Tutorial on how to translate Unity games?
I managed to make it works exporting the single file and not the gameobjects BUT if i change the number of letters translating the game crashes..
-
- Posts: 2
- Joined: Fri Mar 19, 2021 5:08 pm
Re: Tutorial on how to translate Unity games?
Hello. I'm trying to translate a Unity game but I'm having some troubles. I used AssetsBundleExtractor_2.2stabled_64bit to extract one text file to do a test. Then wit Notepad++ I edited the text and again with ABE I re-import the edited text. Then I saved all obtaining a new file .assets that I have substitute to the original. To be sure that the importing was done correctly I re-extracted the text again and it was confirmed like edited!
Though if I try to play the game, my editings don't appear. Do you know why?
Thks
Though if I try to play the game, my editings don't appear. Do you know why?
Thks
-
- Posts: 81
- Joined: Sun Jul 10, 2016 11:07 am
Re: Tutorial on how to translate Unity games?
probably the text appears in multiple instances in the game or you are editing a base game not the update? if on colsoles
-
- Posts: 2
- Joined: Fri Mar 19, 2021 5:08 pm
Re: Tutorial on how to translate Unity games?
happydance wrote:probably the text appears in multiple instances in the game or you are editing a base game not the update? if on colsoles
I'm translating a base-game (not update or dlc) on pc. What do you suggest to do?
-
- Posts: 30
- Joined: Wed Aug 04, 2021 9:52 am
Re: Tutorial on how to translate Unity games?
The_Reaper_CooL wrote:In Hungary we have a meeting for translators, and we've just held the 2nd one. Unfortunately I couldn't attend, but I've made a video regarding the matter. I could show you the video, but it's in Hungarian language.
szia. én magyar vagyok, szal tök jó lenne az a video, ha még megvan. nagyon megköszönném, ha elküldenéd a linkjét.
-
- Posts: 48
- Joined: Wed Jun 09, 2021 10:23 pm
-
- Posts: 7
- Joined: Sun Aug 01, 2021 2:20 am
Re: Tutorial on how to translate Unity games?
cih99 wrote:https://www.adslgate.com/dsl/showthread.php?t=2301430
If changing the language with the program but the replaced language does not work, can it depend on some particular factor?
-
- Posts: 1
- Joined: Sun Jun 26, 2022 10:42 am
Re: Tutorial on how to translate Unity games?
The_Reaper_CooL wrote:In Hungary we have a meeting for translators, and we've just held the 2nd one. Unfortunately I couldn't attend, but I've made a video regarding the matter. I could show you the video, but it's in Hungarian language.
Regardless of that, here's what I've made:
BASIC RULES OF A TRANSLATION:
1. Always make a copy/backup of your files in case you mess something up.
2. Find a very simple part of the game (like the main menu, options, the first text you see...etc) and edit that one to see if you can edit the text or not.
3. Try to change one letter (like "Play" could be changed to "Plai" or anything, maybe "Exit" or "CooL"...etc), and see if you change it then it also changes in the game (and can the game be run at all)
4. Try writing shorter or longer text ("Go" instead of "Play", or "Start", because one is shorter and one is longer), and again, see if the game still works
5. Try out special characters. Because I'm Hungarian, I try out my unicode characters to see which ones work and which ones doesn't (like "íéáőúöüóű").
That covers the basics, let's see how I translate these games:
1. Start the game, and look for an easily editable and viewable text (like the one I've mentioned above, the "Play" one)
2. Exit the game, and open ALL .assets files in Notepad++ (the text could be in resources.assets, sharedassets0.assets or sharedassets3.assets, but I've seen some different results)
3. Now CTRL-F and search your text in all documents. Some documents should pop up and you can see if it contains said text or not. If nothing is shown, then maybe you need to choose a different text and search for that
4. After you've found out where it stores your stuff, then open up that .assets file with UnityEx. By using it, you can extract all files in a folder.
5. Open said folder and open all files in Notepad++, and search for your text. It should give out one file, maybe with a weird extension (like -5, -49, -52...etc).
6. Edit said file and save it, then import it back in with UnityEx.
7. Start the game, see if it works.
If by any chance it doesn't work, then maybe the game has pointers assigned to it. Pointers can be edited with HEX Editors (like HEX Workshop), and they determine how long a certain text can be. If you open up a file and look around it's bits and bytes, you should see something like this: "0004000something". Those 0-s divide the text in the file, and that 4 is a value which determines how long the next text segment will be, which is "Play" in our case, and that's 4 character long.
That's all for today, don't know what else you need, but if you have any questions feel free to ask.
Also I know you've posted like a month ago, but I do hope you are reading these forums and that this little tidbit of text will be helpful for you (or for anyone else)
Hi, everyone. I followed this guide and I managed to do everything until step number 7. If the text is longer than the original, the game will not launch. If the text has the same length as the original, it launches fine with my changes. Ignore the Hex Workshop part. Here's what you need to do to edit it properly so the game can launch with your changes EVEN if the text is longer:
(do everything until step 4)
5. Don't need to extract all files. UnityEx has a "search text" function that can find the exact file where your localization is. Type the text example, hit "search" and it will show you the file that contains this text. In my case I tried with "mixture", which I saw in-game.
6. Right click this file in UnityEx and select "Export with convert or Raw". It will export this file to a subfolder where the archive that you're inspecting is.
7. Download a tool called UnityText: viewtopic.php?t=15438#p65869 this tool will allow you to make changes easily without having to worry about pointers or string length.
8. Adjust the settings so it can read all the strings or it will give you a warning similar to #FileIsEmpty or something like that. In my case, these are the ones that work well:
9. The path to search for files should only contain the archive that you'll be editing because even a 50 MB file can take a pretty long time to be read even on SSD. Once the file is read, to edit a string, right click each line under "file" section and choose "edit". In my case the file has 6 localization languages inside it, so I right-click each line that I see in English:
10. An editing field will open down below. Once you're done translating this string, press "Apply" and you can go to the next one.
11. When you're done with everything or want to check the changes in-game, click the "Pack" button bottom to the right. I do this from time to time because I don't know if this program has an auto-save or backup feature:
12. Clicking "Pack" will create a new file (it doesn't overwrite the one that you have open) inside the directory where your (for example) resources.assets file is under something like (in my case) "Unity_Asset_Files_new".
13. You need to copy this file and paste it in the folder where UnityEx would normally have extracted the original file, in my case it was the Unity_Asset_Files\Resources folder (because the original file was inside resources.assets).
14. Now you need to open the original resources.assets file again with UnityEx, repeat step 5 of my guide and leave the line highlighted. Then press "import files" (which can be done with the free version of UnityEx) and you'll see that the green bar is moving and once it's done, the size and the Hex address offset should have changed by themselves:
15. Now you can launch the game and check your changes. In a lot of cases the text can be too long and not fit, this is trial and error by checking in-game. A good length reference can be checking the other 5 languages inside your file and seeing which one is the longest, as that will be the limit.
16. (optional) you can click "Export" inside UnityText to extract the strings to a .csv file and run it with Word to look for typos in order to proofread your work.