Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/src/date_picker_theme.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const double DATETIME_PICKER_ITEM_HEIGHT = 36.0;
const TextStyle DATETIME_PICKER_ITEM_TEXT_STYLE =
const TextStyle(color: Color(0xFF000046), fontSize: 16.0);

class DateTimePickerTheme with DiagnosticableMixin {
class DateTimePickerTheme with Diagnosticable {
final cancelDefault = const Text('OK');

/// DateTimePicker theme.
Expand Down
5 changes: 5 additions & 0 deletions lib/src/i18n/date_picker_i18n.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ part 'strings_fr.dart';
part 'strings_sr_cyr.dart';
part 'strings_sr_lat.dart';
part 'strings_nl.dart';
part 'strings_th.dart';

abstract class _StringsI18n {
const _StringsI18n();
Expand Down Expand Up @@ -119,6 +120,9 @@ enum DateTimePickerLocale {

/// Dutch (NL)
nl,

/// Thai (TH)
th_th,
}

/// Default value of date locale
Expand Down Expand Up @@ -150,6 +154,7 @@ const Map<DateTimePickerLocale, _StringsI18n> datePickerI18n = {
DateTimePickerLocale.sr_cyrl: const _StringsSrCyrillic(),
DateTimePickerLocale.sr_latn: const _StringsSrLatin(),
DateTimePickerLocale.nl: const _StringsNl(),
DateTimePickerLocale.th_th: const _StringsTh(),
};

class DatePickerI18n {
Expand Down
78 changes: 78 additions & 0 deletions lib/src/i18n/strings_th.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
part of 'date_picker_i18n.dart';

/// Thai (TH)
class _StringsTh extends _StringsI18n {
const _StringsTh();

@override
String getCancelText() {
return "ยกเลิก";
}

@override
String getDoneText() {
return "เรียบร้อย";
}

@override
List<String> getMonths() {
return [
"มกราคม",
"กุมภาพันธ์",
"มีนาคม",
"เมษายน",
"พฤษภาคม",
"มิถุนายน",
"กรกฎาคม",
"สิงหาคม",
"กันยายน",
"ตุลาคม",
"พฤศจิกายน",
"ธันวาคม",
];
}

@override
List<String> getMonthsShort() {
return [
"ม.ค.",
"ก.พ.",
"มี.ค.",
"เม.ย.",
"พ.ค.",
"มิ.ย.",
"ก.ค.",
"ส.ค.",
"ก.ย.",
"ต.ค.",
"พ.ย.",
"ธ.ค.",
];
}

@override
List<String> getWeeksFull() {
return [
"จันทร์",
"อังคาร",
"พุธ",
"พฤหัสบดี",
"ศุกร์",
"เสาร์",
"อาทิตย์",
];
}

@override
List<String> getWeeksShort() {
return [
"จ",
"อ",
"พ",
"พฤ",
"ศ",
"ส",
"อา",
];
}
}