Closed jwall-sycle closed 8 years ago
Hi @jwall-sycle , thanks for your PR. However for this package I aim to remain consistent with Laravel (which takes the same convention from Symfony) by continuing to use the locale.
Thanks for you're feedback. I've been poking around and it seems like it might be something thats addressed in laravel 5.3!
Thanks for the laravel issue, I'll take an eye on it! :)
Could you possibly reconsider this, @micheleangioni? This was a breaking change for us, as Symfony uses Lang vs Locale correctly (see above links), but Laravel is conflating them. For example, we have regional language differences for different English Locales (British vs. US vs. Australia, etc).
At the very least, it would be nice if this package could "fail gracefully" by stripping off the option Country specifier, until Laravel fixes this in 5.3.
@matthew-sycle generally speaking I wish to continue to follow the Laravel standard. I'll be ready to change convention if Laravel 5.3 changes its own.
However, how do you suggest it should "fail gracefully"? One idea could be to take the first two characters from 'en_US', 'en_CA', 'en_GB' so that all three goes to 'en'.
Yeah, that makes a lot of sense to me! I think in most cases, pluralization patterns are per-language, not per-country, so that should work.
@matthew-sycle ok, I'll work on that in the weekend
In our system, and I'm sure many others. We use a suffix country code when setting our locale for certain regions. ie. en_US, en_CA, en_GB.
The switch statement is based on the language code and not the locale. It should take the first two characters of the locale instead (the language code.)