function getText(t: timespan) :: text:
set {_return} to "%{_t}%"
set {_ang::*} to ("years" and "year", "months", "month", "days", "day", "hours" , "hour", "minutes" , "minute", "seconds", "second", "and")
set {_pl::*} to ("lata" and "rok", "miesiace", "miesiac", "dni", "dzien", "godziny", "godzina", "minut", "minuta", "sekundy", "sekunda", "i")
loop {_ang::*}:
replace all loop-value with {_pl::%loop-index%} in {_return}
return {_return}
I wykorzystujesz np tak: send getText(10 minutes)
Wyślę "10 minut"