briannesbitt / Carbon

A simple PHP API extension for DateTime.
https://carbon.nesbot.com/
MIT License
16.53k stars 1.28k forks source link

[Translation tool] bn_BD #2974

Closed HZahour closed 5 months ago

HZahour commented 5 months ago
English bn_BD comments
2 years 2 বছর ২ বছর
2yrs 2 বছর ২ বছর
1 year 1 বছর ১ বছর
2 months 2 মাস ২ মাস
2mos 2 মাস ২ মাস
1 month 1 মাস ১ মাস
2 weeks 2 সপ্তাহ ২ সপ্তাহ
2w 2 সপ্তাহ ২ সপ্তাহ
1 week 1 সপ্তাহ ১ সপ্তাহ
a week ১ সপ্তাহ এক সপ্তাহ
2 days 2 দিন ২ দিন
2d 2 দিন ২ দিন
1 day 1 দিন ১ দিন
2 hours 2 ঘন্টা ২ ঘন্টা
2h 2 ঘন্টা ২ ঘন্টা
1 hour 1 ঘন্টা ১ ঘন্টা
2 minutes 2 মিনিট ২ মিনিট
2m 2 মিনিট ২ মিনিট
1 minute 1 মিনিট ১ মিনিট
2 seconds 2 সেকেন্ড ২ সেকেন্ড
2s 2 সেকেন্ড ২ সেকেন্ড
1 second 1 সেকেন্ড ১ সেকেন্ড
2 hours ago 2 ঘন্টা আগে ২ ঘন্টা আগে
2 hours from now 2 ঘন্টা পরে এখন থেকে ২ ঘন্টা পরে
2 hours before 2 ঘন্টা আগে ২ ঘন্টা আগে
2 hours after 2 ঘন্টা পরে ২ ঘন্টা পরে

The numbers in Bengali for the country Bangladesh and India both are following, 0 = ০, 1 = ১, 2 = ২, 3 = ৩, 4 = ৪, 5 = ৫, 6 = ৬, 7 = ৭, 8 = ৮, 9 = ৯

Please note that '4 = ৪' it looks like English number 8 (eight), but it is different.

kylekatarnls commented 5 months ago

Hello,

This is already supported using altNumbers (available as option of forHumans and diffForHumans):

For instance 2 years:

echo CarbonInterval::years(2)->locale('bn_BD')->forHumans(['altNumbers' => true]);

The translation tool is not using alternative numbers because in some languages it's actually available but not that common to use them.

You can check the list of alternative numbers for Bengali here: https://github.com/briannesbitt/Carbon/blob/master/src/Carbon/Lang/bn.php#L99