commerceguys / intl

A PHP internationalization library, powered by CLDR data.
MIT License
361 stars 45 forks source link

Revamp fallback locale handling #50

Closed bojanz closed 6 years ago

bojanz commented 6 years ago

1) $fallbackLocale should default to 'en', not null, to ensure that by default usable data is always returned.

2) $fallbackLocale is not useful on the individual repository methods, remove it. It can still be set via $repository->setFallbackLocale().

3) If a fallback locale is complex ("en-US", for example) then it too should fallback ("en-US", "en").