Hello.
I tried to use more arguments in Translate function.
My C# code:
XML:
Originally, there were only 2 arguments (0 and 1). Apparently, it is not enough to make it work. I looked into Translator code, but it seems like it should work independent of amount of arguments. Yet I am still getting errors about "index should be >=0 and less then amount of arguments" in console-log output.
Could do that without translate at all with const string, but interested what I am doing wrong.
I tried to use more arguments in Translate function.
My C# code:
Code Select
stringBuilder.AppendLine("ContainsBeer".Translate(new object[]
{
this.wortCount,
25,
this.ComponentDef_Inside.label
}));
XML:
Code Select
<ContainsBeer>Contains {0} / {1} {2}.</ContainsBeer>
Originally, there were only 2 arguments (0 and 1). Apparently, it is not enough to make it work. I looked into Translator code, but it seems like it should work independent of amount of arguments. Yet I am still getting errors about "index should be >=0 and less then amount of arguments" in console-log output.
Could do that without translate at all with const string, but interested what I am doing wrong.