Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move I18n configuration to I18n.config.
- Loading branch information
Showing
2 changed files
with
90 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4a7baea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@josevalim I know it's been ages but I just came across this and I was wondering whether there was/is a specific reason to introduce a dedicated
Config
object vs. just having the config on the class itself. Was it just a purely organizational refactoring or was there more to it?4a7baea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We wanted it to be thread local, so modifying in one thread does not affect the locale in another one, but that should apply to multiple configurations. So swapping a whole object is much easier/cheaper than doing it one by one.
4a7baea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Of course that makes perfect sense!