setLocale - with callback #52183
Unanswered
nodashi404
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi guys.
Developers often need to alter system locale just for some particular task withing code and then return back to original locale. Wouldn't it be nice to have a
setLocale
method with second callback parameter that would set locale only for the execution of given closure?I mean something like this:
Or maybe introduce another method somethong like
withLocale($locale, $callback)
. What do you think about it?Beta Was this translation helpful? Give feedback.
All reactions