The Localize component uses the Primary and Secondary terms to define what translations and font should be shown in the labels.


But sometimes this information is meant to be set at runtime. For instance, in the Reward screen, you would like the Reward text to show the localized Title of the reward you are getting.

This can be accomplish by calling the function SetTerm(...) of the Localize component.


// Access the Localize component in the label

var localize = label.GetComponent<Localize>();


// Change the term

localize.SetTerm( "REWARD_1");                      // Only the Primary term (secondary is left unchanged)

// or

localize.SetTerm("REWARD_2", "FONT_2")         // Change the Primary and Secondary Terms


Created with the Personal Edition of HelpNDoc: Easily create HTML Help documents