1. Hey, I've been looking at several other plugins that use the Lang API but I still don't understand. If I have this
    Code:
    Discord.Call(lang.GetMessage("ReportMessage", this, id), player.Name, player.Id, targetUser.Name, targetUser.Id, message);
    and this
    Code:
    void LoadDefaultMessages()
            {
                //English
                lang.RegisterMessages(new Dictionary<string, string>
                {
                    ["LoadingError"] = "{0} Discord not loaded correctly, please chjeck your plugin directory for Discord.cs file",
                    ["PlayerNotFound"] = "{0} Player not found.",
                    ["ReportConfirmation"] = "{0}Your report has been sent!",
                    ["ReportMessage"] = "{0}{3} ({4}) reported {5} ({6}) for {7}"
            }, this);
            }
    output this:
    Code:
    Bobakanoosh (SteamID) reported Wulf (SteamID) for hacking
     
  2. Wulf

    Wulf Community Admin

    If you are setting the Lang API messages in a method called LoadDefaultMessages(), then you'd also need to call that from your Init() or Loaded() hook. For actually replacing variables in messages, you'd need to use string.Format to replace them with actual information.

    Code:
    Discord.Call(string.Format(lang.GetMessage("ReportMessage", this, id), player.Name, player.Id, targetUser.Name, targetUser.Id, message));
     
  3. Yes I am loading it in void Init(){}. I will test if it works.