Mobile gaming often faces the problem of lack of native language support. Developers from other countries release masterpieces, but the text inside remains in English, Chinese or Korean, which significantly complicates the perception of the plot and interface. A logical question arises: is it possible to independently adapt the project to suit yourself? It turns out that it is possible to make a localization for an Android game even without deep programming knowledge, if you act carefully and follow the algorithm.
The localization process is a modification of the application source code, namely, working with text resources packed inside the archive APK. You don't need to rewrite the app's logic or change graphic assets. The main task is to extract files, translate strings and reassemble the container. To do this, specialized decompilation tools are used, which have become a standard in the modding community.
Before you begin practical actions, you need to prepare your workspace. Make sure you have enough free space on your drive, as temporary files can take up hundreds of megabytes when unpacked. It is also critical to make a backup copy of the original installation file. If a syntax error occurs during the editing process, you can always roll back to the original version and start over without losing data.
Required tools and environment preparation
For successful localization you will need a computer with a Windows, Linux or macOS operating system. Mobile utilities for this task exist, but they are often limited in functionality and less stable when working with large projects. The main tool in any modder's arsenal is APKTool. This is a console utility that allows you to disassemble applications into components, edit resources and assemble them back into a working installer.
In addition to APKTool itself, you need to install the Java Development Kit (JDK). Without the Java runtime environment, the utility simply won't run. Also, for the convenience of working with text files, it is recommended to use an advanced code editor, for example Notepad++ or Visual Studio Code. A regular Windows notepad may display the encoding incorrectly or add extra characters, which will cause the application to crash on startup.
- ๐ ๏ธ Download the latest version of APKTool from the official GitHub repository.
- โ Install the current version of the JDK and add its path to your system environment variables.
- ๐ Prepare a text editor that supports UTF-8 encoding without BOM.
- ๐ Create a separate folder for the project where you place the original APK and scripts.
โ ๏ธ Attention: Never edit files inside the folder
smaliif your goal is only to translate text. Changing the code logic requires deep knowledge of the Dalvik assembler and can lead to complete inoperability of the game.
After installing all components, check their functionality. Open a command prompt and enter the command to check the version of the utility. If the system issues a version number, it means that the environment is configured correctly and is ready for use. Otherwise, check the paths to the executable files in the system settings.
Use the command java -version i apktool --version to quickly check the readiness of the tools before starting work.
Decompiling the game package
The first stage of work is extracting the contents from the installation file. Android games are distributed in APKformat, which is essentially a ZIP archive with a specific structure. However, simply renaming the extension is not enough, since the files inside (especially classes.dex) are compiled into bytecode. APKTool performs the decompilation procedure, turning the bytecode into a readable format smali and extracting resources.
To begin, place the game file, for example game.apkin the folder with the utility or add the path to the utility to the system PATH variable. Run Command Prompt as an administrator to avoid problems with file permissions. Go to the directory with the game using the command cd and enter the instructions for unpacking.
apktool d game.apk -o game_decoded
This command will create a new folder game_decodedwhich will contain the complete structure of the project. You will see many directories: res for resources, smali for code, assets for additional data. We are interested in the folder res, namely the subfolder values. This is where the file is stored strings.xmlcontaining all the text lines of the interface.
What to do if the game is divided into several APKs (Split APKs)?
Modern games often use the App Bundle format (.aab) or split APKs. In this case, you need to first combine them into one file using the APK Bundle Tool or download a single APK from a reliable source, otherwise the decompilation will throw an error.
The decompilation process may take from a few seconds to several minutes depending on the size of the game and the power of your processor. If you see the message Done!, it means the files were successfully extracted. If the process aborts with an error, try using the --no-resflag, although this will make it impossible to edit resources, which defeats our purpose. Most often, errors occur due to a damaged file or an incompatible version of APKTool.
Searching and editing text resources
After successful unpacking, itโs time for the most creative part - translation. Open the folder game_decoded/res/values and find the file strings.xml. This file is an XML document where each line of text is wrapped in a <string name="...">tag. The tag value is a unique identifier that is used in the game code, and the tag content is the text visible to the user.
Open the file in your text editor. You will see a structure like this:
<string name="btn_start">Start Game</string>
<string name="msg_loading">Loading resources...</string>
Your task is to replace the English text with Russian without touching the attributes name and the tags themselves. It is important to preserve the XML structure. If you remove the closing tag or add an extra character, the game will not start. It is also worth paying attention to special characters. For example, an apostrophe in English often requires escaping in Android: instead don't you need to write don\'t.
- ๐ Use file search to quickly find specific phrases.
- ๐ Watch the length of the lines: Russian text that is too long may not fit into the button.
- โ ๏ธ Do not remove formatting characters such as
\n(line breaks) or%s(variables).
In some games, text may be split into multiple files depending on the context or located in folders with different names, for example arrays.xml for lists. Carefully examine the contents of the folder values. If the game supports multiple languages, you may see folders values-es (Spanish) or values-de (German). To create a Russian localization, you will need to create a new folder values-ru and place the translated file there strings.xml.
โ ๏ธ Attention: If the text contains variables like
%1$sor%d, be sure to save them in the same order. These tags are replaced with dynamic data (player name, score) during the game. Removing them will break the display of information.
โ๏ธ Translation quality control
Creating a Russian locale and encoding
The Android system determines the interface language based on suffixes in the names of resource folders. The default folder is values. To add the Russian language, create a new folder in the directory res name values-ru. Copy your edited file into it strings.xml. Now, if the system language is set to Russian, the game will automatically pull up lines from this folder.
The critical point is to save the file in the correct encoding. Android requires the use of UTF-8. When saving in the editor Notepad++ select the "Encodings" menu and make sure the "UTF-8 without BOM" checkbox is checked. The presence of a BOM (Byte Order Mark) tag at the beginning of the file may lead to the fact that the first tag will not be recognized, and the application will crash with an error at startup.
If the game does not have built-in support for switching languages โโand is hardcoded in English, simply replacing files may not be enough. In such cases, it is sometimes necessary to edit the file AndroidManifest.xml or configuration files inside the folder assetsto force the system to use the Russian locale. However, in 90% of cases, creating a folder values-ru is sufficient.
The main rule of localization: create a folder values-ru and save the strings.xml file in UTF-8 encoding without BOM. This is the base, without which the rest makes no sense.
Pay attention to the length of the lines. Russian often requires more symbols to express the same idea than English. The phrase "Start" (5 characters) becomes "Start" (6 characters), but "Settings" (8 characters) becomes "Settings" (9 characters). In the interface, buttons have a fixed size. If the text does not fit, it may be cut off or overlap other elements. In such cases, you have to look for shorter synonyms or abbreviations.
Building a modified application
After all the texts have been translated and saved in the correct folders, you need to build the project back into the installation file. This process is called compilation or assembly. APKTool takes the modified resources and code, packages them and signs them with a digital signature (although a signature is not required for tests, it is required for installation on the device).
Return to the command line, being in the folder with the unpacked project, and run the build command:
apktool b game_decoded -o game_ru.apk
Flag here b means build, game_decoded is the folder with the sources, and -o game_ru.apk sets the name of the output file. The build process may take some time. At the end you will receive a file game_ru.apkthat contains your translation. If errors appear in the console, read them carefully: most often they indicate a syntax error in the XML file (unclosed tag, extra space).
The resulting file cannot yet be installed on the phone. When rebuilding, APKTool signs it with a test key, which is different from the developer key. The Android system blocks the installation of applications with an unsigned or foreign key over existing ones, and a valid signature is required for a new installation. You will need a signature tool, for example Uber APK Signer or a console utility jarsigner.
| Stage | Action | Tool | Result |
|---|---|---|---|
| 1 | Decompilation | APKTool | Folder with source code and resources |
| 2 | Editing | Text editor | Translated strings.xml file |
| 3 | Building | APKTool | Uncertified APK file |
| 4 | Signature | Uber APK Signer | Ready to install APK |
Use Uber APK Signer for automatic signing. Just drag the file game_ru.apk to the app window, and it will create a signed version with the suffix -signed. It is this file that needs to be transferred to the smartphone for installation.
โ ๏ธ Attention: If the original version of the game with a different signature is already installed on the phone, the system will not allow you to update it with your version. You will have to completely delete the original before installing the Russified version, which may lead to loss of progress if it is not saved in the cloud.
Installing and testing the result
The final step is to transfer the signed file to the Android device. You can use a USB cable, cloud storage or instant messenger. Before installation, go to your phone's security settings and allow installation of applications from unknown sources for the file manager or browser through which you will run the installer.
Run the installation. If the process was successful, the game icon will appear on the desktop. Launch the application and check the interface. Pay attention to all screens: main menu, settings, dialogs, pop-up messages. It often happens that some lines are placed in separate files or hardcoded in the code, and their translation could be missed.
If the game crashes immediately after launch or when going to a certain screen, then there is an error in the file strings.xml . This could be an unclosed tag, an invalid symbol, or a structural violation. In this case, you will have to return to the editing stage, correct the error and rebuild the project. Keep a change log to quickly find problem areas.
Also test the operation of the variables. If the text should display the amount of gold or character level, make sure that there are no blank spaces or error symbols instead of numbers. This is a sign that the variable %s was accidentally deleted or shifted during editing.
Possible problems and their solutions
The localization process rarely goes perfectly the first time. There are a number of typical problems that beginners face. One of the most common is the application crashing at startup. Most often this is due to an error in the XML markup. Check the file for unclosed tags or invalid characters. Using online XML validators can help find syntax errors.
Another problem is that the text is not displayed, instead you can see squares or hieroglyphs. This is a sure sign of an encoding problem. Make sure that the file is saved strictly in UTF-8. Some fonts in the game may not support Cyrillic. In this case, the situation is more complicated: you will need to replace the font files in the folder assets with ones that contain Russian glyphs, which requires graphic editing and selection of compatible files.
- ๐ป The game crashes: check the XML syntax and the integrity of the tags.
- ๐ฒ Squares instead of letters: change the encoding to UTF-8 without BOM.
- ๐ The text is cut off: shorten the translation or reduce the font (if possible).
- ๐ Progress has been reset: make a backup of the data before installing mods.
Sometimes the text is โhardwiredโ directly into files classes.dex (in code). In such cases, a simple replacement strings.xml is not enough. Requires decompilation in Smali, searching for a line in the code and replacing it. This is a more advanced level of modding that requires an understanding of the bytecode structure. First, try to find a line in the files smali by searching in the project folder.
Why does translation not work in online games?
In games with a constant online connection, the text is often downloaded from the developer's server. The local strings.xml file in such cases is ignored by the server, and it is impossible to make a full-fledged Russifier without interfering with network traffic (which is difficult and may be illegal).
Is it possible to Russify a game without a computer, only on a phone?
Technically, this is possible using applications like MT Manager or NP Manager. They allow you to open the APK, edit resources and rebuild the file directly on the device. However, the interface of such apps is more complex, and the risk of errors is higher due to the limited screen and less convenient text entry. For one-time tasks, it is better to use a PC.
Is it safe to install modified APK files?
If you created the mod yourself from an official file, it is safe. However, downloading ready-made crackers from unverified sources carries the risk of malware infection. Always scan the files with an antivirus and, if possible, make mods yourself to control the content.
What to do if, after translation, the game requires an update?
When updating the game via Google Play, your modified version will be overwritten by the official one. You will either have to disable auto-update for this game or repeat the localization procedure for the new APK version. Save your files strings.xmlso as not to translate everything again, but only add new lines.
Why are some words left in English?
Probably these words are in other resource files (for example, in arrays.xml or in folders plurals), or they are part of graphic images (pictures with text) that cannot be translated by editing the code. Also, the text can be loaded dynamically from the Internet.
Do I need to get root access to install the crack?
No, root access is not required. You create a new installation file (APK) that installs like a normal application. Root is only needed if you want to replace the files of a system game without reinstalling it, which is a more dangerous and complex method.