Skip to content

Allow null in setLocale to reset to app locale#9

Merged
jordyvanderhaegen merged 1 commit intomasterfrom
feature/set-locale-accept-null
Apr 26, 2026
Merged

Allow null in setLocale to reset to app locale#9
jordyvanderhaegen merged 1 commit intomasterfrom
feature/set-locale-accept-null

Conversation

@jordyvanderhaegen
Copy link
Copy Markdown
Collaborator

Changes

  • Updated setLocale to accept ?string instead of string, allowing null to be passed
  • Passing null resets translationLocale to null, causing getLocale() to fall back to config('app.locale')
  • Added a test covering this behaviour

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@jordyvanderhaegen jordyvanderhaegen merged commit 20b8930 into master Apr 26, 2026
22 checks passed
@jordyvanderhaegen jordyvanderhaegen deleted the feature/set-locale-accept-null branch April 26, 2026 13:14
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.

1 participant