2020-11-25 11:08:12 +08:00
|
|
|
|
using System.Globalization;
|
|
|
|
|
using System.Text.Json.Serialization;
|
2020-09-08 16:43:44 +08:00
|
|
|
|
using AntDesign.Form.Locale;
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
|
|
|
|
namespace AntDesign.Locales
|
|
|
|
|
{
|
|
|
|
|
public class Locale
|
|
|
|
|
{
|
2022-11-04 13:46:24 +08:00
|
|
|
|
private CultureInfo _currentCulture;
|
|
|
|
|
|
|
|
|
|
internal void SetCultureInfo(string cultureName)
|
|
|
|
|
{
|
|
|
|
|
LocaleName = cultureName;
|
|
|
|
|
_currentCulture = new(cultureName);
|
|
|
|
|
this.DatePicker.GetCultureInfo = () => _currentCulture;
|
|
|
|
|
this.DatePicker.Lang.GetCultureInfo = () => _currentCulture;
|
|
|
|
|
}
|
|
|
|
|
|
2020-09-08 16:43:44 +08:00
|
|
|
|
[JsonPropertyName("locale")]
|
2022-11-04 13:46:24 +08:00
|
|
|
|
public string LocaleName { get; private set; }
|
2020-09-08 16:43:44 +08:00
|
|
|
|
|
2022-11-04 13:46:24 +08:00
|
|
|
|
public CultureInfo CurrentCulture => _currentCulture;
|
2020-11-25 11:08:12 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public PaginationLocale Pagination { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public DatePickerLocale DatePicker { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public TimePickerLocale TimePicker { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public DatePickerLocale Calendar { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public TableLocale Table { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public ModalLocale Modal { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public ConfirmLocale Confirm { get; set; } = new();
|
2020-12-29 23:34:18 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public PopconfirmLocale Popconfirm { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public TransferLocale Transfer { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public SelectLocale Select { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public UploadLocale Upload { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public GlobalLocale Global { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public PageHeaderLocale PageHeader { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public EmptyLocale Empty { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public IconLocale Icon { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public TextLocale Text { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public FormLocale Form { get; set; } = new();
|
2021-01-25 02:05:18 +08:00
|
|
|
|
|
2021-07-06 01:10:16 +08:00
|
|
|
|
public ImageLocale Image { get; set; } = new();
|
2021-11-04 00:46:20 +08:00
|
|
|
|
|
|
|
|
|
public ReuseTabsLocale ReuseTabs { get; set; } = new();
|
2020-09-07 22:46:50 +08:00
|
|
|
|
}
|
|
|
|
|
}
|