Jump to content

[HELP!] How do I decode localized strings?


Recommended Posts

I've been successful thus far in reading ConfigNodes, but now I've encountered a new problem.

PART
{
	...
	title = #autoLOC_500592 //#autoLOC_500592 = Mk3 Liquid Fuel Fuselage Short
	...
}

 

How do I decode localized strings?

Link to comment
Share on other sites

In many UI fields, you can include them directly in-line and the core game code will take care of it for you:

Otherwise you can call Localizer.Format (via "using KSP.Localization;") to get the formatted string

Full details:

 

Link to comment
Share on other sites

1 hour ago, Xyphos said:

Damn, man 3 for 3 --- you're good.

You're asking questions that I've had to investigate myself fairly recently, so it's my turn to pay it forward. Once you get to more difficult stuff, I'll pipe down and someone else will step in (probably DMagic :cool:).

Link to comment
Share on other sites

36 minutes ago, HebaruSan said:

You're asking questions that I've had to investigate myself fairly recently, so it's my turn to pay it forward.

Fair enough, and much appreciated.

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