Skip to content

Commit

Permalink
Force browser page refresh on locale change
Browse files Browse the repository at this point in the history
  • Loading branch information
nanaya committed Jan 7, 2025
1 parent 52ea0cf commit 7ee9ce6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public function setLocale()
]);
}

return ext_view('layout.ujs-reload', [], 'js')
return ext_view('layout.ujs_full_reload', [], 'js')
->withCookie(cookie()->forever('locale', $newLocale));
}

Expand Down
5 changes: 5 additions & 0 deletions resources/views/layout/ujs_full_reload.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{{--
Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the GNU Affero General Public License v3.0.
See the LICENCE file in the repository root for full licence text.
--}}
window.location.reload();

0 comments on commit 7ee9ce6

Please sign in to comment.