my first mod has been reviewed and i was told that
Code:It is missing the player ID string with the Lang API usage; this is what makes the localization per player possible.lang.GetMessage(key, this, "playeridgoeshere")
i am trying to add that to my code but i am a little lost now, this is my code
Code:private string Lang(string key, params object[] args) => string.Format(lang.GetMessage(key, this), args); private new void LoadDefaultMessages() { //English lang.RegisterMessages(new Dictionary<string, string> { ["ConfigChanged"] = "{0} set to {1}" }, this); }
and this is how i call the lang to send a message to the player
i feel like it is something really simple but i dont understand it :cCode:SendReply(player, Lang("ConfigChanged"), variableName, variableValue);
Localization in Lang API
Discussion in 'Rust Development' started by Bruno Puccio, Apr 11, 2018.
-
Code:
SendReply(player, Lang("ConfigChanged", SteamIdHere, variableName, variableValue));
-
-
Wulf Community Admin
-
Code:lang.GetMessage("ConfigChanged", this, player.userID.ToString()), args
-
Wulf Community Admin
-