Jump to content

how i translate mods?


Ivanlol151

Recommended Posts

I don't know if it is the best place to do this, I would like to know how to change the language to the mods,  I am Spanish, and I want to know how to help to the community but I don't know how, could someone tell me how?

 

translated by google translator

Edited by Ivanlol151
Link to comment
Share on other sites

There are two possibilities:

1) The mod contains a .dll file which holds some of the text which you want to translate (for example part mods with custom part modules or anything which adds an UI to the game):

If the mod makes use of the localization feature in KSP (which is a requirement to make it easy to translate), it usually contains a folder called "localization" which holds all the localization config files. Well, sometimes it's just a plain config file within the mod folder, for example: "en-us.cfg", "es-es.cfg", etc.

These config files look like this:

Localization
{
	en-us
	{
		#autoLOC_something = Some text to explain
		#autoLOC_something_else = Something else to explain
	}
}

This would be a localization file for english, as you can tell by the "en-us" in the third line. To translate everything to spanish, copy the whole file, change "en-us" to "es-es" and translate everything on the right side of the equal sign. Don't touch the "autoLOC" part or anything which has a "#" in front of it, this is important for the mod to grab the correct text whenever it is supposed to be displayed in game.

If the mod doesn't use this system, there is no easy way to translate it and share the result. Also, ask the creator of the mod, if someone is already working on a translation and how you can share the result with him/her.

 

2) The mod contains just config files (for example tech tree mods, many contract packs, etc):

Similar to the way above, you can translate these fairly easy if they already use the localization feature but if they don't, in this case you can implement it on your own ;)

Take a look at each and every config file of the mod and look for texts which will be displayed ingame, like part descriptions, titles, etc. Then, you can create a new localization file like the one above, introduce your own "#autoLOC_" tag (for example "#autoLOC_<modname>_1"), replace the text from the mod config with your new "#autLOC_" tag and write the tag together with the original text in the new translation file.

For example, let's assume there is a mod called "Kerbal NoseCone" which changes the name and description of a part and comes with a module manager patch like this:

@PART[noseCone]
{
	@title = Improved Nosecone Deluxe
	@description = This is my awesome kerbalised Nosecone, it's GREEN!!!
}

Then you can change it to:

@PART[noseCone]
{
	@title = #autoLOC_KerbalNoseCone_1
	@description = #autoLOC_KerbalNoseCone_2
}

Add the original text in:

Localization
{
	en-us
	{
		#autoLOC_KerbalNoseCone_1 = Improved Nosecone Deluxe
		#autoLOC_KerbalNoseCone_2 = This is my awesome kerbalised Nosecone, it's GREEN!!!
	}
}

And your translation in:

Localization
{
	es-es
	{
		#autoLOC_KerbalNoseCone_1 = Nosecone Deluxe mejorado
		#autoLOC_KerbalNoseCone_2 = Esta es mi increíble Nosecone kerbalizada, ¡es VERDE!
	}
}

 

But again, make sure the mod creator is actually interested in this if you want to share the result and ask how you can share the results :)

Edited by 4x4cheesecake
Link to comment
Share on other sites

On 3/26/2020 at 6:10 PM, Ivanlol151 said:

I don't know if it is the best place to do this, I would like to know how to change the language to the mods,  I am Spanish, and I want to know how to help to the community but I don't know how, could someone tell me how?

 

translated by google translator

an old but good article on this:

https://github.com/zer0Kerbal/SimpleLogistics/tree/master/assets/lang

 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...