commerceguys / intl

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

Revamp repository locale handling #57

Closed bojanz closed 6 years ago

bojanz commented 6 years ago

50 made some progress, but we have more problems:

1) The RepositoryLocaleTrait methods are not on any of the repository interfaces 2) Having setters for default locale / fallback locale introduces unnecessary state. 3) Having a trait in the first place requires us to copy it over to addressing once we move countries there. 4) We want to copy the repository locale approach to the NumberFormatter once we refactor it, but having extra methods there adds too much noise. 5) NumberFormatRepository has a default locale that isn't even used.

Solution: