Ludeon Forums

RimWorld => Mods => Translations => Topic started by: joeyeti on May 05, 2014, 08:37:01 AM

Title: Translating "Defs" - do I have it right?
Post by: joeyeti on May 05, 2014, 08:37:01 AM
Judging by the other translations already included in 0.4.430 I just wanted to be sure - for my own Slovak translation I need to create a "DefInjected" subfolder (besides "Keyed") in "sk-SK", copy in there all the folders under "Mods\Core\Defs" and translate the XML files in them?
Title: Re: Translating "Defs" - do I have it right?
Post by: Neone on May 05, 2014, 08:45:22 AM
Not exactly - translation files have only lines that need to be translated, while Mods\Core\Defs have all data in them. Language Def files have also a little different structure and names.

Easiest way is to copy DefInjected from other translator (German, French, Polish) and then translate - you can find English version of text in  Mods\Core\Defs, while copying from other translator gives you proper structure.
Title: Re: Translating "Defs" - do I have it right?
Post by: joeyeti on May 05, 2014, 09:04:26 AM
Ok... so there is no up-to-date english source for the Language Def files then?
Title: Re: Translating "Defs" - do I have it right?
Post by: Neone on May 05, 2014, 09:08:49 AM
Yes there is - but it is not a copy paste source.

It is a 'find what you need' source.
Title: Re: Translating "Defs" - do I have it right?
Post by: Tynan on May 05, 2014, 11:34:53 AM
The original English data is in the main game XML data under Defs/. Translating this works by replacing fields from the main game XML. You create new language data which is "injected" into the game data at the end of the loading process to replace the English data.

So if you want to replace the <label> or the item with defname <defName>Metal</defName>, you would write:

<Metal.label>Newname</Metal.label>

In a DefInjected XML file.

As Neone notes, you'll want to look at other languages for reference.

Moving this to Translations board.
Title: Re: Translating "Defs" - do I have it right?
Post by: joeyeti on May 05, 2014, 12:48:23 PM
Thx both! Working on it already, based on the german translation.

One more question - are only those files in Definjected in the german translation used? Cause there are more XML files in the subdirs under "Core\Defs"... But maybe those do not contain anything translatable (yet)...
Title: Re: Translating "Defs" - do I have it right?
Post by: Tynan on May 05, 2014, 12:57:15 PM
You'll want to work directly from the Core/Defs data to be most complete. The Germans may have missed something.
Title: Re: Translating "Defs" - do I have it right?
Post by: Haplo on May 05, 2014, 02:00:28 PM
Right now the german may not be complete. I've made only a quick update from 420 to the 430 version yet.
Didn't have much time to do an in depth look through, so it may be that there is still something missing. :)