Made a program for packing/unpacking language files (*.dat). You need .Net to run it
To unpack:
1. First you need to unpack resource file MB4 Resource pack/unpack | Xiaomi Mi Band 4 | GeekDoing
2. Then drag and drop the .dat file onto mb4_lang_tool.exe
3. A folder with utf-8 encoded .txt translation files and header.json header files file should appear next to the .dat file
For packing:
1. drag and drop the folder with translations (.txt files) onto mb4_lang_tool.exe
2. in the folder with translations should appear .dat file, which can be packaged into resources
Regarding .txt files:
\n in .txt files means line break
you should not change the number of rows
the name of the file with the translation (*.txt) must match the name of the translation ("name") in the header.json file
Regarding header.json:
"number" - translation number, bracelet identifies translations by number
"device_language" is the name of the language to which the "number" corresponds. just for reference, does not affect anything
"name" - name of the translation in the language file + name of the file containing the translation
For example, to replace Chinese there are two ways:
1. copy the contents of the file Russian ru.txt to zh-rCN.txt
2. in the header.json file for the language with the number 0 (which corresponds to the Chinese language), change the value of "name": "zh-rCN" to "name": "Russian ru", then during packing of the .dat file, Russian ru.txt will be used instead zh-rCN.txt
For the English translation a separate truncated chartable is used, only with latin letters. Therefore, you cannot replace English with another language, which uses letters other than the English alphabet.
To unpack:
1. First you need to unpack resource file MB4 Resource pack/unpack | Xiaomi Mi Band 4 | GeekDoing
2. Then drag and drop the .dat file onto mb4_lang_tool.exe
3. A folder with utf-8 encoded .txt translation files and header.json header files file should appear next to the .dat file
For packing:
1. drag and drop the folder with translations (.txt files) onto mb4_lang_tool.exe
2. in the folder with translations should appear .dat file, which can be packaged into resources
Regarding .txt files:
\n in .txt files means line break
you should not change the number of rows
the name of the file with the translation (*.txt) must match the name of the translation ("name") in the header.json file
Regarding header.json:
"number" - translation number, bracelet identifies translations by number
"device_language" is the name of the language to which the "number" corresponds. just for reference, does not affect anything
"name" - name of the translation in the language file + name of the file containing the translation
For example, to replace Chinese there are two ways:
1. copy the contents of the file Russian ru.txt to zh-rCN.txt
2. in the header.json file for the language with the number 0 (which corresponds to the Chinese language), change the value of "name": "zh-rCN" to "name": "Russian ru", then during packing of the .dat file, Russian ru.txt will be used instead zh-rCN.txt
For the English translation a separate truncated chartable is used, only with latin letters. Therefore, you cannot replace English with another language, which uses letters other than the English alphabet.
Attachments
-
214.5 KB Views: 563
Last edited: