Page 1 of 2

[Request] Multilanguage support

Posted: Mon Aug 13, 2012 10:59 am
by riderr3
Do you remember conquer.eng file from original Red Alert 1? This file stores language strings. In OpenRA would be useful if different language strings stored in special yaml files like english.yaml, spanish.yaml e.t.c. in folder "openra/mods/ra/languages", and modders can more easily translate text/menu on many languages by adding new yamls. Then change the language in game options dropdown box(auto read any new language yaml).

Example of english.yaml

Code: Select all

1:
	Missile Silo
2:
	Game is full
3:
	OpenRA Reimagining of the classic game
4:
	Big and slow tank, with anti-air capability.\n  Strong vs Tanks, Aircraft\n  Weak vs Infantry
First is the number(ID) of the string, second is the text which can be translated to other language in another yaml.

Because now is annoying to translate every name in different yaml's, need to create another mod for this, and there are incompatibility with old versions, and may be desync in online play.

I trying to make myself, but I don't have good programming skill in C#

You can post your thoughts here if you have some

Posted: Mon Aug 13, 2012 11:51 am
by Matt
I experimented a bit and this already works because you can overwrite yaml strings with other yamls:

I created a mods/ra/rules/structures.german.yaml which only has language strings

Code: Select all

POWR:
	Tooltip:
		Name: Kraftwerk
		Description: Erzeugt Energie für andere Gebäude
and added it to mods/ra/mods.yaml

Code: Select all

Rules:
	mods/ra/rules/structures.german.yaml
	mods/ra/rules/structures.yaml
This way I get a localized tooltip. It is important to have it above the original yaml otherwise the original english version will overwrite it and not the other way round.

Note: This won't work with chrome/*.yaml yet.

You can also create a simple german.yaml and put everything in there. The layout is not defined by OpenRA's source code. Adding a new setting to choose the current language should be easy. I suggest adding a new set of yaml fieldloaders to mods.yaml which will be loaded on demand:

Code: Select all

Languages:
	german.yaml
OpenRA also renders some text on the icons as text like READY/ON HOLD which can be made configurable by YAMLs. We could use the textless cameos by Harisson and print the text using the OpenRA engine.

Support for localized speeches is more difficult as they are not Freeware and OpenRA's CD ripper won't work because it is not a general InstallShield extractor. https://github.com/OpenRA/OpenRA/issues/2216

chinese

Posted: Wed Aug 15, 2012 8:55 pm
by CPL Pro
i`m a chinese noob :lol:

Posted: Thu Aug 16, 2012 9:54 pm
by MrTweek
this is not bad =)

Posted: Fri Aug 17, 2012 6:19 am
by Matt
Or it might be easier if we translate this like .desktop files

Code: Select all

POWR:
   Tooltip:
      Name: Power Plant
      Name[de]: Kraftwerk
      Description: Generates energy for other buildings
      Description[de]: Erzeugt Energie für andere Gebäude

Posted: Mon Dec 03, 2012 7:17 pm
by Matt
Started to work on this at https://github.com/Mailaender/OpenRA/tree/localisation I got French and German voices from http://www.stuffhost.de/files/redalert/ ... anual.html They are however customized and incomplete. It would be great if someone could send me the .mix files from an original CD for comparison. Also the German censorship is a little weird.

I separated the Tooltip from the rest of the rules for easy translation https://github.com/Mailaender/OpenRA/co ... on#diff-34 and used textless cameos from Harisson http://www.sleipnirstuff.com/forum/view ... hp?t=15353 The text can be printed onto the icons using the game engine, later. However demo truck, chrono tank, Volkov and Sniper are not yet textless.

This requires no source code changes at the moment. I might only add few exceptions later like a language switch in settings. Some things are hard-coded like the HOLD/READY or the loading screen text. If people care about this, I will finish this project. Also saw Russian and French OpenRA UI translations back then. Please tell me the links so I can add them or submit your own translations. Currently I will just duplicate the whole chrome/*.yaml thing in subfolders https://github.com/Mailaender/OpenRA/co ... ion#diff-6

Posted: Tue Dec 04, 2012 12:01 am
by Matt
Just found http://riderr3.ucoz.ru/index/perevod/0-20 Will try to merge it although it is quite outdated.

French language patch

Posted: Tue Dec 04, 2012 12:13 pm
by Matt
And Google.fr exposed http://forum.cncsaga.com/topic/7214-ope ... -patch-fr/ and http://www.timeofwar.com/downloads.php?id=1156 which dates the 2012-03-15 release. Will try to merge this and contact the creators.

French mix

Posted: Tue Dec 04, 2012 9:02 pm
by lion95heart
Hi everybody, if you want, I have the original cd in French with the *. Mix files. I can give you.

Posted: Tue Dec 04, 2012 10:12 pm
by Matt
I found language packs for RA at http://www.redalert95.tk/ and CnC at http://nyerguds.arsaneus-design.com/cnc95upd/cc95p106/ Seems to be partly ripped from modern titles or fan dubs. The community is still quite active as the spanish RA translation is only two months old. http://forums.cncnz.com/topic/17225-red ... uage-pack/ Need to sort all that stuff.

You can use http://xhp.xwis.net/utilities/XCC_Mixer.html to find the original .mix files on your installation CD that contain the voices. There are also .mix files inside .mix files.

Posted: Wed Dec 05, 2012 10:40 pm
by Harisson
I can help with Czech and Slovak translation... What I need to do ? Is there any lang. txt file or I need change TEXT: from every units ?

Posted: Wed Dec 05, 2012 11:52 pm
by Matt
Go to https://github.com/Mailaender/OpenRA/tr ... s/ra/rules copy the folder "/en" and rename it to the ISO code of your target language, start translating, change mod.yaml to test it. Translating Tooltips works without hassle.

You can also do the same thing for chrome YAMLs though this might change later when I find out how to enhance the Widget source code to allow merging one GUI from multiple files without crashing the game.

Posted: Thu Dec 06, 2012 7:36 pm
by gefroy
Is there a list of languages what are in progress? I would like to help with Finnish language or start the project.

Posted: Thu Dec 06, 2012 10:50 pm
by Matt
Okay, I created https://github.com/OpenRA/OpenRA/wiki/Translation to keep track of the status. If you want to start translating I suggest to add something to this list to avoid duplicated efforts. Send pull requests at GitHub or upload it here in the forums. Have a look at the mods/*/rules folder and /mods/*/mod.yaml to see how it is currently done. I updated https://github.com/Mailaender/OpenRA/co ... calisation You can now translate the RA and CnC mod to any language and test some of the voice packs (it's fun). Also suggest how you want to be mentioned in AUTHORS.

Posted: Fri Dec 14, 2012 12:45 pm
by bunny
i suppose i could translate into swedish if needed ^^