Jump to content

MCM Translation expand string?


smashly

Recommended Posts

Hi,

I have a mod I updated and I'm now adding translation support for the mcm side of things.

The problem I have is when I want to add some text to a translation string it fails.

Example:

In my translation file:

$Evict    Evict

In my MCM script:

sClear[0] = "$Evict" + " " + (idx + 1) + " " + (nthAlias.GetActorRef().GetLeveledActorBase().GetName() As String)

I was hoping it would produce:

Evict # Name

But instead it produces:

$Evict # Name

Obviously this is because the translation is looking for "$Evict # Name" and not "$Evict".

So how do I get the $Evict string value so I can expand on it.

Is there a expand variable flag or something along the lines.

 

In most cases I can work around it, but surely I'm just missing a simple flag to expand the string variable before appending text to the end of it.

 

Any input is welcome.

 

Link to comment
Share on other sites

Enclose the extra part inside {}

 

Example from a mod I'm working on.

 

Defined in the translation file as...

$Ammo{}	{}

Called in the MCM script as...

ArrowOrder[Z] = "$Ammo{"+EntryName+"}"

The output in my case is the value that is assigned during run time to the string EntryName. You might need to play with it a bit to have the string that you want.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...