Hi, i try to translate plugin to my language, but I find some words I can't change in lang files, and only way is edit code.
My language have many time forms, and i do solved it like that.
private static string FormatTime(TimeSpan time)
{
var values = new List<string>();
if (time.Days != 0)
if (time.Days == 1) values.Add($"{time.Days} dzień");
else values.Add($"{time.Days} dni");
if (time.Hours != 0)
if (time.Hours == 1) values.Add($"{time.Hours} godzinę");
else values.Add($"{time.Hours} godzin(y)");
if (time.Minutes != 0)
if (time.Minutes == 1) values.Add($"{time.Minutes} minutę");
else values.Add($"{time.Minutes} minut(y)");
if (time.Seconds != 0)
if (time.Seconds == 1) values.Add($"{time.Seconds} sekundę");
else values.Add($"{time.Seconds} sekund(y)");
return values.ToSentence();
}
Problem is with "values.ToSentence()". I try to find how to change last separator from "and" to "i", but is hard to find the solution in google. Can you help my? 'values.ToSentence(", ", " i ")' < I was trying this, but dosn't work.