mybb / mybb2

The repository for the MyBB 2 forum software. Not to be used on live boards.
https://www.mybb.com
BSD 3-Clause "New" or "Revised" License
109 stars 45 forks source link

Use php-intl for translation instead of built in Laravel's translator #244

Open pklebba opened 8 years ago

pklebba commented 8 years ago

My friend made that package for Laravel for better language support than built in solution: https://github.com/Skysplit/laravel5-intl-translation

You can say, why? So, currently it is impossible to properly format plural rules in many languages, as in some languages' rules are not just ranges, but often require modulo operations etc. MessageFormatter allows it.

For example, let's use Polish word "miesiąc" (means "month"):

More here: http://www.unicode.org/cldr/charts/latest/supplemental/language_plural_rules.html#pl

It's not possible to correctly implement that word in built in Laravel's package. In English language it's not a problem, because here we have just two options: month and months. But there's a problem for Polish, Russian, Arabic and many more. That's why I think it should be taken into consideration.

He's working on it in official Laravel repository: https://github.com/laravel/internals/issues/160

euantorano commented 8 years ago

Hi,

I wasn't aware of these problems in the standard Lang package, if it doesn't support those required features, we will have to look elsewhere for definite. Thanks for bringing it to our attention!

pklebba commented 8 years ago

That's great, thanks! 😄