Skip to content

[6.x] Fix translator locale#14323

Merged
jasonvarga merged 2 commits into6.xfrom
localize-middleware-translator
Mar 24, 2026
Merged

[6.x] Fix translator locale#14323
jasonvarga merged 2 commits into6.xfrom
localize-middleware-translator

Conversation

@jasonvarga
Copy link
Copy Markdown
Member

This PR adjusts the localize middleware to update the locale of the translator directly rather than as a side-effect of updating the entire app locale.

Setting the entire app locale had side effects of its own, including altering behavior of certain Carbon features like startOfWeek().

@jasonvarga jasonvarga marked this pull request as draft March 23, 2026 21:48
…cope

Frontend Localize sets the translator only; align the test with
app()->getLocale() staying the default while PHP LC_TIME and
translator follow the site.

Made-with: Cursor
@edalzell
Copy link
Copy Markdown
Contributor

This works perfectly for me @jasonvarga

@jasonvarga jasonvarga marked this pull request as ready for review March 24, 2026 15:59
@jasonvarga jasonvarga merged commit 75a502a into 6.x Mar 24, 2026
17 checks passed
@jasonvarga jasonvarga deleted the localize-middleware-translator branch March 24, 2026 16:00
jasonvarga added a commit that referenced this pull request Mar 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants