diff --git a/README.md b/README.md index 1e2750c..2eb034c 100644 --- a/README.md +++ b/README.md @@ -31,4 +31,5 @@ See the example for simple use - Hebrew (HE) - Indonesian (ID) - Turkish (TR) +- Norwegian (NO) diff --git a/lib/i18n/date_picker_i18n.dart b/lib/i18n/date_picker_i18n.dart index ffc8ff6..22f7c8b 100644 --- a/lib/i18n/date_picker_i18n.dart +++ b/lib/i18n/date_picker_i18n.dart @@ -1,21 +1,23 @@ import 'dart:math'; -part 'strings_en_us.dart'; -part 'strings_zh_cn.dart'; -part 'strings_pt_br.dart'; -part 'strings_es.dart'; -part 'strings_ro.dart'; -part 'strings_bn.dart'; part 'strings_ar.dart'; -part 'strings_jp.dart'; -part 'strings_ru.dart'; +part 'strings_bn.dart'; part 'strings_de.dart'; -part 'strings_ko.dart'; -part 'strings_it.dart'; -part 'strings_hu.dart'; +part 'strings_en_us.dart'; +part 'strings_es.dart'; part 'strings_he.dart'; +part 'strings_hu.dart'; part 'strings_id.dart'; +part 'strings_it.dart'; +part 'strings_jp.dart'; +part 'strings_ko.dart'; +part 'strings_no_nb.dart'; +part 'strings_no_nn.dart'; +part 'strings_pt_br.dart'; +part 'strings_ro.dart'; +part 'strings_ru.dart'; part 'strings_tr.dart'; +part 'strings_zh_cn.dart'; abstract class _StringsI18n { const _StringsI18n(); @@ -85,6 +87,11 @@ enum DateTimePickerLocale { /// Turkish (TR) tr, + /// Norwegian Bokmål (NO) + no_nb, + + /// Norwegian Nynorsk (NO) + no_nn } /// Default value of date locale @@ -108,6 +115,8 @@ const Map datePickerI18n = { DateTimePickerLocale.he: const _StringsHe(), DateTimePickerLocale.id: const _StringsId(), DateTimePickerLocale.tr: const _StringsTr(), + DateTimePickerLocale.no_nb: const _StringsNoNb(), + DateTimePickerLocale.no_nn: const _StringsNoNn(), }; class DatePickerI18n { diff --git a/lib/i18n/strings_no_nb.dart b/lib/i18n/strings_no_nb.dart new file mode 100644 index 0000000..e9ba740 --- /dev/null +++ b/lib/i18n/strings_no_nb.dart @@ -0,0 +1,60 @@ +part of 'date_picker_i18n.dart'; + +/// Norwegian Bokmål (NO) +class _StringsNoNb extends _StringsI18n { + const _StringsNoNb(); + + @override + String getCancelText() { + return 'Avbryt'; + } + + @override + String getDoneText() { + return 'Ferdig'; + } + + @override + List getMonths() { + return [ + "Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember" + ]; + } + + @override + List getWeeksFull() { + return [ + "Mandag", + "Tirsdag", + "Onsdag", + "Torsdag", + "Fredag", + "Lørdag", + "Søndag", + ]; + } + + @override + List getWeeksShort() { + return [ + "Man", + "Tir", + "Ons", + "Tor", + "Fre", + "Lør", + "Søn", + ]; + } +} diff --git a/lib/i18n/strings_no_nn.dart b/lib/i18n/strings_no_nn.dart new file mode 100644 index 0000000..78d99c2 --- /dev/null +++ b/lib/i18n/strings_no_nn.dart @@ -0,0 +1,60 @@ +part of 'date_picker_i18n.dart'; + +/// Norwegian Nynorsk (NO) +class _StringsNoNn extends _StringsI18n { + const _StringsNoNn(); + + @override + String getCancelText() { + return 'Avbryt'; + } + + @override + String getDoneText() { + return 'Ferdig'; + } + + @override + List getMonths() { + return [ + "Januar", + "Februar", + "Mars", + "April", + "Mai", + "Juni", + "Juli", + "August", + "September", + "Oktober", + "November", + "Desember" + ]; + } + + @override + List getWeeksFull() { + return [ + "Måndag", + "Tysdag", + "Onsdag", + "Torsdag", + "Fredag", + "Laurdag", + "Søndag", + ]; + } + + @override + List getWeeksShort() { + return [ + "Mån", + "Tys", + "Ons", + "Tor", + "Fre", + "Lau", + "Søn", + ]; + } +}