8 "github.com/go-playground/locales"
9 "github.com/go-playground/locales/currency"
12 type vai_Latn_LR struct {
14 pluralsCardinal []locales.PluralRule
15 pluralsOrdinal []locales.PluralRule
16 pluralsRange []locales.PluralRule
24 currencies []string // idx = enum of currency code
25 currencyNegativePrefix string
26 currencyNegativeSuffix string
27 monthsAbbreviated []string
30 daysAbbreviated []string
34 periodsAbbreviated []string
35 periodsNarrow []string
38 erasAbbreviated []string
41 timezones map[string]string
44 // New returns a new instance of translator for the 'vai_Latn_LR' locale
45 func New() locales.Translator {
47 locale: "vai_Latn_LR",
54 currencies: []string{"ADP", "AED", "AFA", "AFN", "ALK", "ALL", "AMD", "ANG", "AOA", "AOK", "AON", "AOR", "ARA", "ARL", "ARM", "ARP", "ARS", "ATS", "AUD", "AWG", "AZM", "AZN", "BAD", "BAM", "BAN", "BBD", "BDT", "BEC", "BEF", "BEL", "BGL", "BGM", "BGN", "BGO", "BHD", "BIF", "BMD", "BND", "BOB", "BOL", "BOP", "BOV", "BRB", "BRC", "BRE", "BRL", "BRN", "BRR", "BRZ", "BSD", "BTN", "BUK", "BWP", "BYB", "BYN", "BYR", "BZD", "CAD", "CDF", "CHE", "CHF", "CHW", "CLE", "CLF", "CLP", "CNX", "CNY", "COP", "COU", "CRC", "CSD", "CSK", "CUC", "CUP", "CVE", "CYP", "CZK", "DDM", "DEM", "DJF", "DKK", "DOP", "DZD", "ECS", "ECV", "EEK", "EGP", "ERN", "ESA", "ESB", "ESP", "ETB", "EUR", "FIM", "FJD", "FKP", "FRF", "GBP", "GEK", "GEL", "GHC", "GHS", "GIP", "GMD", "GNF", "GNS", "GQE", "GRD", "GTQ", "GWE", "GWP", "GYD", "HKD", "HNL", "HRD", "HRK", "HTG", "HUF", "IDR", "IEP", "ILP", "ILR", "ILS", "INR", "IQD", "IRR", "ISJ", "ISK", "ITL", "JMD", "JOD", "JPY", "KES", "KGS", "KHR", "KMF", "KPW", "KRH", "KRO", "KRW", "KWD", "KYD", "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LTT", "LUC", "LUF", "LUL", "LVL", "LVR", "LYD", "MAD", "MAF", "MCF", "MDC", "MDL", "MGA", "MGF", "MKD", "MKN", "MLF", "MMK", "MNT", "MOP", "MRO", "MTL", "MTP", "MUR", "MVP", "MVR", "MWK", "MXN", "MXP", "MXV", "MYR", "MZE", "MZM", "MZN", "NAD", "NGN", "NIC", "NIO", "NLG", "NOK", "NPR", "NZD", "OMR", "PAB", "PEI", "PEN", "PES", "PGK", "PHP", "PKR", "PLN", "PLZ", "PTE", "PYG", "QAR", "RHD", "ROL", "RON", "RSD", "RUB", "RUR", "RWF", "SAR", "SBD", "SCR", "SDD", "SDG", "SDP", "SEK", "SGD", "SHP", "SIT", "SKK", "SLL", "SOS", "SRD", "SRG", "SSP", "STD", "SUR", "SVC", "SYP", "SZL", "THB", "TJR", "TJS", "TMM", "TMT", "TND", "TOP", "TPE", "TRL", "TRY", "TTD", "TWD", "TZS", "UAH", "UAK", "UGS", "UGX", "USD", "USN", "USS", "UYI", "UYP", "UYU", "UZS", "VEB", "VEF", "VND", "VNN", "VUV", "WST", "XAF", "XAG", "XAU", "XBA", "XBB", "XBC", "XBD", "XCD", "XDR", "XEU", "XFO", "XFU", "XOF", "XPD", "XPF", "XPT", "XRE", "XSU", "XTS", "XUA", "XXX", "YDD", "YER", "YUD", "YUM", "YUN", "YUR", "ZAL", "ZAR", "ZMK", "ZMW", "ZRN", "ZRZ", "ZWD", "ZWL", "ZWR"},
55 currencyNegativePrefix: "(",
56 currencyNegativeSuffix: ")",
57 monthsWide: []string{"", "ꖨꕪꖃ ꔞꕮ", "ꕒꕡꖝꖕ", "ꕾꖺ", "ꖢꖕ", "ꖑꕱ", "6", "7", "ꗛꔕ", "ꕢꕌ", "ꕭꖃ", "ꔞꘋꕔꕿ ꕸꖃꗏ", "ꖨꕪꕱ ꗏꕮ"},
58 daysWide: []string{"ꕞꕌꔵ", "ꗳꗡꘉ", "ꕚꕞꕚ", "ꕉꕞꕒ", "ꕉꔤꕆꕢ", "ꕉꔤꕀꕮ", "ꔻꔬꔳ"},
59 timezones: map[string]string{"AWST": "AWST", "AWDT": "AWDT", "WART": "WART", "EST": "EST", "ACST": "ACST", "ECT": "ECT", "SGT": "SGT", "HNOG": "HNOG", "ADT": "ADT", "CLT": "CLT", "AKDT": "AKDT", "HNCU": "HNCU", "NZDT": "NZDT", "WITA": "WITA", "ARST": "ARST", "HECU": "HECU", "UYST": "UYST", "MDT": "MDT", "WARST": "WARST", "HNPMX": "HNPMX", "HEPM": "HEPM", "VET": "VET", "HKT": "HKT", "GFT": "GFT", "AKST": "AKST", "PST": "PST", "LHST": "LHST", "JST": "JST", "EAT": "EAT", "CHAST": "CHAST", "WIT": "WIT", "EDT": "EDT", "MYT": "MYT", "UYT": "UYT", "TMT": "TMT", "AEST": "AEST", "HNEG": "HNEG", "HEEG": "HEEG", "HNT": "HNT", "ACDT": "ACDT", "WESZ": "WESZ", "HEPMX": "HEPMX", "MESZ": "MESZ", "HNNOMX": "HNNOMX", "HENOMX": "HENOMX", "OEZ": "OEZ", "CLST": "CLST", "ACWST": "ACWST", "NZST": "NZST", "LHDT": "LHDT", "CAT": "CAT", "BOT": "BOT", "HEOG": "HEOG", "HKST": "HKST", "COT": "COT", "CDT": "CDT", "WAST": "WAST", "WEZ": "WEZ", "TMST": "TMST", "MEZ": "MEZ", "AEDT": "AEDT", "SAST": "SAST", "WAT": "WAT", "MST": "MST", "IST": "IST", "COST": "COST", "PDT": "PDT", "ChST": "ChST", "HAST": "HAST", "OESZ": "OESZ", "ART": "ART", "AST": "AST", "GYT": "GYT", "HAT": "HAT", "WIB": "WIB", "GMT": "GMT", "CHADT": "CHADT", "ACWDT": "ACWDT", "JDT": "JDT", "∅∅∅": "∅∅∅", "SRT": "SRT", "HADT": "HADT", "HNPM": "HNPM", "BT": "BT", "CST": "CST"},
63 // Locale returns the current translators string locale
64 func (vai *vai_Latn_LR) Locale() string {
68 // PluralsCardinal returns the list of cardinal plural rules associated with 'vai_Latn_LR'
69 func (vai *vai_Latn_LR) PluralsCardinal() []locales.PluralRule {
70 return vai.pluralsCardinal
73 // PluralsOrdinal returns the list of ordinal plural rules associated with 'vai_Latn_LR'
74 func (vai *vai_Latn_LR) PluralsOrdinal() []locales.PluralRule {
75 return vai.pluralsOrdinal
78 // PluralsRange returns the list of range plural rules associated with 'vai_Latn_LR'
79 func (vai *vai_Latn_LR) PluralsRange() []locales.PluralRule {
80 return vai.pluralsRange
83 // CardinalPluralRule returns the cardinal PluralRule given 'num' and digits/precision of 'v' for 'vai_Latn_LR'
84 func (vai *vai_Latn_LR) CardinalPluralRule(num float64, v uint64) locales.PluralRule {
85 return locales.PluralRuleUnknown
88 // OrdinalPluralRule returns the ordinal PluralRule given 'num' and digits/precision of 'v' for 'vai_Latn_LR'
89 func (vai *vai_Latn_LR) OrdinalPluralRule(num float64, v uint64) locales.PluralRule {
90 return locales.PluralRuleUnknown
93 // RangePluralRule returns the ordinal PluralRule given 'num1', 'num2' and digits/precision of 'v1' and 'v2' for 'vai_Latn_LR'
94 func (vai *vai_Latn_LR) RangePluralRule(num1 float64, v1 uint64, num2 float64, v2 uint64) locales.PluralRule {
95 return locales.PluralRuleUnknown
98 // MonthAbbreviated returns the locales abbreviated month given the 'month' provided
99 func (vai *vai_Latn_LR) MonthAbbreviated(month time.Month) string {
100 return vai.monthsAbbreviated[month]
103 // MonthsAbbreviated returns the locales abbreviated months
104 func (vai *vai_Latn_LR) MonthsAbbreviated() []string {
108 // MonthNarrow returns the locales narrow month given the 'month' provided
109 func (vai *vai_Latn_LR) MonthNarrow(month time.Month) string {
110 return vai.monthsNarrow[month]
113 // MonthsNarrow returns the locales narrow months
114 func (vai *vai_Latn_LR) MonthsNarrow() []string {
118 // MonthWide returns the locales wide month given the 'month' provided
119 func (vai *vai_Latn_LR) MonthWide(month time.Month) string {
120 return vai.monthsWide[month]
123 // MonthsWide returns the locales wide months
124 func (vai *vai_Latn_LR) MonthsWide() []string {
125 return vai.monthsWide[1:]
128 // WeekdayAbbreviated returns the locales abbreviated weekday given the 'weekday' provided
129 func (vai *vai_Latn_LR) WeekdayAbbreviated(weekday time.Weekday) string {
130 return vai.daysAbbreviated[weekday]
133 // WeekdaysAbbreviated returns the locales abbreviated weekdays
134 func (vai *vai_Latn_LR) WeekdaysAbbreviated() []string {
135 return vai.daysAbbreviated
138 // WeekdayNarrow returns the locales narrow weekday given the 'weekday' provided
139 func (vai *vai_Latn_LR) WeekdayNarrow(weekday time.Weekday) string {
140 return vai.daysNarrow[weekday]
143 // WeekdaysNarrow returns the locales narrow weekdays
144 func (vai *vai_Latn_LR) WeekdaysNarrow() []string {
145 return vai.daysNarrow
148 // WeekdayShort returns the locales short weekday given the 'weekday' provided
149 func (vai *vai_Latn_LR) WeekdayShort(weekday time.Weekday) string {
150 return vai.daysShort[weekday]
153 // WeekdaysShort returns the locales short weekdays
154 func (vai *vai_Latn_LR) WeekdaysShort() []string {
158 // WeekdayWide returns the locales wide weekday given the 'weekday' provided
159 func (vai *vai_Latn_LR) WeekdayWide(weekday time.Weekday) string {
160 return vai.daysWide[weekday]
163 // WeekdaysWide returns the locales wide weekdays
164 func (vai *vai_Latn_LR) WeekdaysWide() []string {
168 // Decimal returns the decimal point of number
169 func (vai *vai_Latn_LR) Decimal() string {
173 // Group returns the group of number
174 func (vai *vai_Latn_LR) Group() string {
178 // Group returns the minus sign of number
179 func (vai *vai_Latn_LR) Minus() string {
183 // FmtNumber returns 'num' with digits/precision of 'v' for 'vai_Latn_LR' and handles both Whole and Real numbers based on 'v'
184 func (vai *vai_Latn_LR) FmtNumber(num float64, v uint64) string {
186 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
187 l := len(s) + 1 + 1*len(s[:len(s)-int(v)-1])/3
190 b := make([]byte, 0, l)
192 for i := len(s) - 1; i >= 0; i-- {
195 b = append(b, vai.decimal[0])
202 b = append(b, vai.group[0])
213 b = append(b, vai.minus[0])
217 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
218 b[i], b[j] = b[j], b[i]
224 // FmtPercent returns 'num' with digits/precision of 'v' for 'vai_Latn_LR' and handles both Whole and Real numbers based on 'v'
225 // NOTE: 'num' passed into FmtPercent is assumed to be in percent already
226 func (vai *vai_Latn_LR) FmtPercent(num float64, v uint64) string {
227 return strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
230 // FmtCurrency returns the currency representation of 'num' with digits/precision of 'v' for 'vai_Latn_LR'
231 func (vai *vai_Latn_LR) FmtCurrency(num float64, v uint64, currency currency.Type) string {
233 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
234 symbol := vai.currencies[currency]
235 l := len(s) + len(symbol) + 1 + 1*len(s[:len(s)-int(v)-1])/3
238 b := make([]byte, 0, l)
240 for i := len(s) - 1; i >= 0; i-- {
243 b = append(b, vai.decimal[0])
250 b = append(b, vai.group[0])
260 for j := len(symbol) - 1; j >= 0; j-- {
261 b = append(b, symbol[j])
265 b = append(b, vai.minus[0])
269 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
270 b[i], b[j] = b[j], b[i]
276 b = append(b, vai.decimal...)
279 for i := 0; i < 2-int(v); i++ {
287 // FmtAccounting returns the currency representation of 'num' with digits/precision of 'v' for 'vai_Latn_LR'
288 // in accounting notation.
289 func (vai *vai_Latn_LR) FmtAccounting(num float64, v uint64, currency currency.Type) string {
291 s := strconv.FormatFloat(math.Abs(num), 'f', int(v), 64)
292 symbol := vai.currencies[currency]
293 l := len(s) + len(symbol) + 3 + 1*len(s[:len(s)-int(v)-1])/3
296 b := make([]byte, 0, l)
298 for i := len(s) - 1; i >= 0; i-- {
301 b = append(b, vai.decimal[0])
308 b = append(b, vai.group[0])
320 for j := len(symbol) - 1; j >= 0; j-- {
321 b = append(b, symbol[j])
324 b = append(b, vai.currencyNegativePrefix[0])
328 for j := len(symbol) - 1; j >= 0; j-- {
329 b = append(b, symbol[j])
335 for i, j := 0, len(b)-1; i < j; i, j = i+1, j-1 {
336 b[i], b[j] = b[j], b[i]
342 b = append(b, vai.decimal...)
345 for i := 0; i < 2-int(v); i++ {
351 b = append(b, vai.currencyNegativeSuffix...)
357 // FmtDateShort returns the short date representation of 't' for 'vai_Latn_LR'
358 func (vai *vai_Latn_LR) FmtDateShort(t time.Time) string {
360 b := make([]byte, 0, 32)
366 b = strconv.AppendInt(b, int64(t.Day()), 10)
367 b = append(b, []byte{0x2f}...)
373 b = strconv.AppendInt(b, int64(t.Month()), 10)
375 b = append(b, []byte{0x2f}...)
378 b = strconv.AppendInt(b, int64(t.Year()), 10)
380 b = strconv.AppendInt(b, int64(-t.Year()), 10)
386 // FmtDateMedium returns the medium date representation of 't' for 'vai_Latn_LR'
387 func (vai *vai_Latn_LR) FmtDateMedium(t time.Time) string {
389 b := make([]byte, 0, 32)
391 b = strconv.AppendInt(b, int64(t.Day()), 10)
392 b = append(b, []byte{0x20}...)
393 b = append(b, vai.monthsAbbreviated[t.Month()]...)
394 b = append(b, []byte{0x20}...)
397 b = strconv.AppendInt(b, int64(t.Year()), 10)
399 b = strconv.AppendInt(b, int64(-t.Year()), 10)
405 // FmtDateLong returns the long date representation of 't' for 'vai_Latn_LR'
406 func (vai *vai_Latn_LR) FmtDateLong(t time.Time) string {
408 b := make([]byte, 0, 32)
410 b = strconv.AppendInt(b, int64(t.Day()), 10)
411 b = append(b, []byte{0x20}...)
412 b = append(b, vai.monthsWide[t.Month()]...)
413 b = append(b, []byte{0x20}...)
416 b = strconv.AppendInt(b, int64(t.Year()), 10)
418 b = strconv.AppendInt(b, int64(-t.Year()), 10)
424 // FmtDateFull returns the full date representation of 't' for 'vai_Latn_LR'
425 func (vai *vai_Latn_LR) FmtDateFull(t time.Time) string {
427 b := make([]byte, 0, 32)
429 b = append(b, vai.daysWide[t.Weekday()]...)
430 b = append(b, []byte{0x2c, 0x20}...)
431 b = strconv.AppendInt(b, int64(t.Day()), 10)
432 b = append(b, []byte{0x20}...)
433 b = append(b, vai.monthsWide[t.Month()]...)
434 b = append(b, []byte{0x20}...)
437 b = strconv.AppendInt(b, int64(t.Year()), 10)
439 b = strconv.AppendInt(b, int64(-t.Year()), 10)
445 // FmtTimeShort returns the short time representation of 't' for 'vai_Latn_LR'
446 func (vai *vai_Latn_LR) FmtTimeShort(t time.Time) string {
448 b := make([]byte, 0, 32)
456 b = strconv.AppendInt(b, int64(h), 10)
457 b = append(b, vai.timeSeparator...)
463 b = strconv.AppendInt(b, int64(t.Minute()), 10)
464 b = append(b, []byte{0x20}...)
467 b = append(b, vai.periodsAbbreviated[0]...)
469 b = append(b, vai.periodsAbbreviated[1]...)
475 // FmtTimeMedium returns the medium time representation of 't' for 'vai_Latn_LR'
476 func (vai *vai_Latn_LR) FmtTimeMedium(t time.Time) string {
478 b := make([]byte, 0, 32)
486 b = strconv.AppendInt(b, int64(h), 10)
487 b = append(b, vai.timeSeparator...)
493 b = strconv.AppendInt(b, int64(t.Minute()), 10)
494 b = append(b, vai.timeSeparator...)
500 b = strconv.AppendInt(b, int64(t.Second()), 10)
501 b = append(b, []byte{0x20}...)
504 b = append(b, vai.periodsAbbreviated[0]...)
506 b = append(b, vai.periodsAbbreviated[1]...)
512 // FmtTimeLong returns the long time representation of 't' for 'vai_Latn_LR'
513 func (vai *vai_Latn_LR) FmtTimeLong(t time.Time) string {
515 b := make([]byte, 0, 32)
523 b = strconv.AppendInt(b, int64(h), 10)
524 b = append(b, vai.timeSeparator...)
530 b = strconv.AppendInt(b, int64(t.Minute()), 10)
531 b = append(b, vai.timeSeparator...)
537 b = strconv.AppendInt(b, int64(t.Second()), 10)
538 b = append(b, []byte{0x20}...)
541 b = append(b, vai.periodsAbbreviated[0]...)
543 b = append(b, vai.periodsAbbreviated[1]...)
546 b = append(b, []byte{0x20}...)
554 // FmtTimeFull returns the full time representation of 't' for 'vai_Latn_LR'
555 func (vai *vai_Latn_LR) FmtTimeFull(t time.Time) string {
557 b := make([]byte, 0, 32)
565 b = strconv.AppendInt(b, int64(h), 10)
566 b = append(b, vai.timeSeparator...)
572 b = strconv.AppendInt(b, int64(t.Minute()), 10)
573 b = append(b, vai.timeSeparator...)
579 b = strconv.AppendInt(b, int64(t.Second()), 10)
580 b = append(b, []byte{0x20}...)
583 b = append(b, vai.periodsAbbreviated[0]...)
585 b = append(b, vai.periodsAbbreviated[1]...)
588 b = append(b, []byte{0x20}...)
592 if btz, ok := vai.timezones[tz]; ok {
593 b = append(b, btz...)