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:
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