Skip to content

RegisterLocalization

Aidanamite edited this page Oct 11, 2021 · 1 revision

Description:

Registers a localization set to the game's localization manager. You will need this for setting the name and description of items as they are ALWAYS fetched from the localization manager

Return Type: string

The returned string is the localization term that you can use for your code

Arguments:

  • string name This is the name id used for registration of this localization. It can be anything you want it but must be different from any other localizations you've registered.

  • Dictionary<string,string> values - This is the set of different text that will be used. Each key is the string represtation of a language (ie "en-US" for US english). You can set the default string to display (this is used if the dictionary does not contain a match for the current the key "default".

Example:

string myItemNameTerm = AssetLib.AssetLibTools.RegisterLocalization("MyItem_Name",new Dictionary<string,string> {
    ["ja"] = "the display name for Japanese",
    ["en-CA"] = "the display name for English (Canadian)",
    ["default"] = "the display name for litterally everything else"
});

Clone this wiki locally