Kaplas80 / TranslationFramework2

Aplicación para facilitar la traducción de diferentes juegos
37 stars 15 forks source link

Cyrillic #10

Closed JackMonores closed 4 years ago

JackMonores commented 4 years ago

Good afternoon! Can I use Cyrillic for translation in the program? In my game, the text is out of bounds and the font is very large. Снимок

Kaplas80 commented 4 years ago

Hi! In Yakuza games, the cyrillic font have "fixed width".

To adjust the width, you can try to replace the characters in the occidental font (hd_hankaku.dds) with cyrillic ones but, in that case, you'd have to modify and recompile my app (file Encoding.cs) to make the characters substitutions in game files.

JackMonores commented 4 years ago

This file needs to be edited in Kiwami or Zero version and what exactly will need to be changed? I only recently started doing this, and I apologize for such stupid questions. (I translate Kiwami) Снимок Снимок

Kaplas80 commented 4 years ago

Hi. You have to modify EncodingReplacements list, adding the characters you want to replace. You have to add one tuple for each replaced character, the first item in the tuple is the cyrillic char and the second one is the original char.

If you are translating Yakuza Kiwami, you have to modify Kiwami's Encoding.cs

JackMonores commented 4 years ago

Hi. You have to modify EncodingReplacements

I have to modify it in Encoding.cs? If so, can you tell us exactly where and how?(if you wish)

Kaplas80 commented 4 years ago

Yes, it starts in line 24 of Encoding.cs

            EncodingReplacements = new List<Tuple<string, string>>
            {
                new Tuple<string, string>("\\r", "\r"),
                new Tuple<string, string>("\\n", "\n"),
                //new Tuple<string, string>("®", "\u007F"),
                new Tuple<string, string>("¥", "\\"),
            };

You have to add one tuple for each char you want to replace. For example, if you replace A with Д in the .dds image, you have to modify EncodingReplacements this way:

            EncodingReplacements = new List<Tuple<string, string>>
            {
                new Tuple<string, string>("\\r", "\r"),
                new Tuple<string, string>("\\n", "\n"),
                //new Tuple<string, string>("®", "\u007F"),
                new Tuple<string, string>("¥", "\\"),
                new Tuple<string, string>("Д", "A"),
            };
JackMonores commented 4 years ago

Thanks, I'll try