diff --git a/packages/timeago/example/main.dart b/packages/timeago/example/main.dart index e4f1855..59b07b5 100644 --- a/packages/timeago/example/main.dart +++ b/packages/timeago/example/main.dart @@ -16,6 +16,8 @@ main() async { timeago.setLocaleMessages('ca_short', timeago.CaShortMessages()); timeago.setLocaleMessages('cs', timeago.CsMessages()); timeago.setLocaleMessages('cs_short', timeago.CsShortMessages()); + timeago.setLocaleMessages('bn', timeago.BnMessages()); + timeago.setLocaleMessages('bn_short', timeago.BnShortMessages()); timeago.setLocaleMessages('da', timeago.DaMessages()); timeago.setLocaleMessages('da_short', timeago.DaShortMessages()); timeago.setLocaleMessages('de', timeago.DeMessages()); diff --git a/packages/timeago/lib/src/messages/bn_messages.dart b/packages/timeago/lib/src/messages/bn_messages.dart new file mode 100644 index 0000000..7eb0b9a --- /dev/null +++ b/packages/timeago/lib/src/messages/bn_messages.dart @@ -0,0 +1,73 @@ +import 'package:timeago/src/messages/lookupmessages.dart'; + +/// English Messages +class BnMessages implements LookupMessages { + @override + String prefixAgo() => ''; + @override + String prefixFromNow() => ''; + @override + String suffixAgo() => 'আগে'; + @override + String suffixFromNow() => 'এখন থেকে'; + @override + String lessThanOneMinute(int seconds) => 'কিছুক্ষন'; + @override + String aboutAMinute(int minutes) => 'এক মিনিট'; + @override + String minutes(int minutes) => '$minutes মিনিট'; + @override + String aboutAnHour(int minutes) => 'এক ঘন্টা'; + @override + String hours(int hours) => '$hours ঘন্টা'; + @override + String aDay(int hours) => 'এক দিন'; + @override + String days(int days) => '$days দিন'; + @override + String aboutAMonth(int days) => 'এক মাস'; + @override + String months(int months) => '$months মাস'; + @override + String aboutAYear(int year) => 'এক বছর'; + @override + String years(int years) => '$years বছর'; + @override + String wordSeparator() => ' '; +} + +/// English short Messages +class BnShortMessages implements LookupMessages { + @override + String prefixAgo() => ''; + @override + String prefixFromNow() => ''; + @override + String suffixAgo() => ''; + @override + String suffixFromNow() => ''; + @override + String lessThanOneMinute(int seconds) => 'এখন'; + @override + String aboutAMinute(int minutes) => '1মিনিট'; + @override + String minutes(int minutes) => '${minutes}মাস'; + @override + String aboutAnHour(int minutes) => '~1ঘন্টা'; + @override + String hours(int hours) => '${hours}ঘন্টা'; + @override + String aDay(int hours) => '~1দিন'; + @override + String days(int days) => '${days}দিন'; + @override + String aboutAMonth(int days) => '~1মাস'; + @override + String months(int months) => '${months}মাস'; + @override + String aboutAYear(int year) => '~1বছর'; + @override + String years(int years) => '${years}বছর'; + @override + String wordSeparator() => ' '; +} diff --git a/packages/timeago/lib/timeago.dart b/packages/timeago/lib/timeago.dart index 0240eb0..2219683 100644 --- a/packages/timeago/lib/timeago.dart +++ b/packages/timeago/lib/timeago.dart @@ -2,6 +2,7 @@ export 'package:timeago/src/messages/am_messages.dart'; export 'package:timeago/src/messages/ar_messages.dart'; export 'package:timeago/src/messages/az_messages.dart'; export 'package:timeago/src/messages/be_messages.dart'; +export 'package:timeago/src/messages/bn_messages.dart'; export 'package:timeago/src/messages/bs_messages.dart'; export 'package:timeago/src/messages/ca_messages.dart'; export 'package:timeago/src/messages/cs_messages.dart'; diff --git a/packages/timeago_flutter_example/lib/main.dart b/packages/timeago_flutter_example/lib/main.dart index 4fb6205..5a6a54e 100644 --- a/packages/timeago_flutter_example/lib/main.dart +++ b/packages/timeago_flutter_example/lib/main.dart @@ -8,6 +8,8 @@ final localesMap = { 'ar_short': ArShortMessages(), 'az': AzMessages(), 'be': BeMessages(), + 'bn': BnMessages(), + 'bn_short': BnShortMessages(), 'bs': BsMessages(), 'ca': CaMessages(), 'cs': CsMessages(),