Total Lines | 21 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | package langset |
||
2 | |||
3 | import "github.com/SerhiiCho/timeago/v3/ctx" |
||
4 | |||
5 | type LangForms map[string]string |
||
6 | |||
7 | type LangSet struct { |
||
8 | Ago string `json:"ago"` |
||
9 | Online string `json:"online"` |
||
10 | JustNow string `json:"justnow"` |
||
11 | Second LangForms `json:"second"` |
||
12 | Minute LangForms `json:"minute"` |
||
13 | Hour LangForms `json:"hour"` |
||
14 | Day LangForms `json:"day"` |
||
15 | Week LangForms `json:"week"` |
||
16 | Month LangForms `json:"month"` |
||
17 | Year LangForms `json:"year"` |
||
18 | } |
||
19 | |||
20 | func New(c *ctx.Ctx) *LangSet { |
||
21 | return parseJsonIntoTrans("../langs/" + c.Config().Language + ".json") |
||
22 | } |
||
23 |