Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: Licht61 on Sun 14/02/2021 15:00:29

Title: Translation (English and Russian languages)
Post by: Licht61 on Sun 14/02/2021 15:00:29
How can I change default language for my game to russian?

The entire original text (script, speech etc) was written in Russian, which is why there was such a need to change the default language. I tried to replace the font number zero with Russian font called apprentice_rus.wfn, but after that, instead of text, I have question marks.

Here's screenshot of font if that important

(https://sun9-13.userapi.com/impg/dWWQTOYDHWEmwnaicpm2iNlM2txcsRADn7Cc2Q/Va-8s4hnFIM.jpg?size=1397x430&quality=96&proxy=1&sign=81c5ac437363be7e7f0a373b5c75b618ype=album)
Title: Re: Translation (English and Russian languages)
Post by: Crimson Wizard on Sun 14/02/2021 15:05:10
If your original project is saved in russian locale, then you need a font that corresponds to cyrillic ANSI codepage - that is Windows-1251: https://ru.wikipedia.org/wiki/Windows-1251

I don't think the above font looks like matching that codepage (it's rather easy to notice that cyrillic letters are not going in alphabet order like they should).
The order of letters in that font looks like someone was trying to imitate cyrillic based on english alphabet... Maybe this font is meant for writing game texts with english letters which are supposed to represent russian. I.e. like PRIVET for ПРИÐ'ЕТ etc.


EDIT: Here's some CP-1251 font I have in my storage, it may be used for a test: http://www.mediafire.com/file/dhxmrywvjyz/Macromedia_Fontographer_4.1J_04b03_%252B_CYR.zip/file
Title: Re: Translation (English and Russian languages)
Post by: Licht61 on Sat 20/02/2021 22:35:55
Quote from: Crimson Wizard on Sun 14/02/2021 15:05:10
If your original project is saved in russian locale, then you need a font that corresponds to cyrillic ANSI codepage - that is Windows-1251: https://ru.wikipedia.org/wiki/Windows-1251

I don't think the above font looks like matching that codepage (it's rather easy to notice that cyrillic letters are not going in alphabet order like they should).
The order of letters in that font looks like someone was trying to imitate cyrillic based on english alphabet... Maybe this font is meant for writing game texts with english letters which are supposed to represent russian. I.e. like PRIVET for ПРИÐ'ЕТ etc.


EDIT: Here's some CP-1251 font I have in my storage, it may be used for a test: http://www.mediafire.com/file/dhxmrywvjyz/Macromedia_Fontographer_4.1J_04b03_%252B_CYR.zip/file

Sorry for late answer! Thanks for the fonts for the test.
I tried to work with them, but the only result that I could achieve is what you said: the letters are not in their "original" places, but, as it were, "replace the" English "counterparts.

I decided to continue doing everything initially in English, and I will deal with other languages later. I don't want to delay too much the overall pace of development, which is already not too fast.

Title: Re: Translation (English and Russian languages)
Post by: phungngo on Fri 14/05/2021 11:26:55
I also had a similar situation that AGS could not display Vietnamese. The main reason I think is that the scripting language in AGS does not support Vietnamese and Russian encodings as well as a few other languages.
Title: Re: Translation (English and Russian languages)
Post by: Crimson Wizard on Fri 14/05/2021 12:18:10
Quote from: phungngo on Fri 14/05/2021 11:26:55
I also had a similar situation that AGS could not display Vietnamese. The main reason I think is that the scripting language in AGS does not support Vietnamese and Russian encodings as well as a few other languages.

phungngo, this Licht61's problem was already solved, see: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59074.0

AGS saves script texts in 1-byte encoding (ANSI). If you have a corresponding system locale set (option called "system locale for non unicode programs" (https://www.java.com/en/download/help/locale.html) in Windows), then you will be able to type and see other languages in script. But the texts will be saved in 1-byte ANSI format, and in your game you would have to use ANSI-compatible fonts to display these texts (you won't be able to just use a proper Unicode font).

There were numerous games made or translated in Russian language, and other languages, such as Polish, etc, you just have to use the technical tricks.

Some people suggest to write game scripts in English language and then create translation files in your language. For some this approach may be easier, but you don't have to.

There's a chance Vietnamese may work too, although I personally never tried or seen one trying. So long as it may be represented with an ANSI codepage, and you get or create an ANSI compatible font - it will work.
Title: Re: Translation (English and Russian languages)
Post by: eri0o on Fri 14/05/2021 16:42:17
I found this text in the wiki goes into a lot of details: https://www.adventuregamestudio.co.uk/wiki/Fonts

I don't know how updated everything is. Maybe if it's updated we should stick it's link somewhere.
Title: Re: Translation (English and Russian languages)
Post by: phungngo on Mon 17/05/2021 09:12:04
I have learned to display Vietnamese on ANSI encoding, need to rewrite the font and then manipulate the exe file to change the default font on the machine, this is quite complicated and requires experts. and I gave up on this project, I just hope AGS supports UTF-8 encoding one day
Title: Re: Translation (English and Russian languages)
Post by: Snarky on Mon 17/05/2021 10:05:28
Quote from: phungngo on Mon 17/05/2021 09:12:04
manipulate the exe file to change the default font on the machine

The process is definitely somewhat difficult, and Unicode support is a must ASAP, but I don't think this step is actually needed. The person making the game needs to have it set correctly (which they can do manually), but once the game is created, it should work correctly no matter what the player's setting is (unless there's anywhere in the game where they have to type to input text).