mirror of
https://github.com/pixelfed/pixelfed.git
synced 2025-01-11 14:40:46 +00:00
Update SiteController
This commit is contained in:
parent
5cb5b5277d
commit
ca1814091a
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@ use Illuminate\Http\Request;
|
||||||
use App, Auth, Cache, View;
|
use App, Auth, Cache, View;
|
||||||
use App\Util\Lexer\PrettyNumber;
|
use App\Util\Lexer\PrettyNumber;
|
||||||
use App\{Follower, Page, Profile, Status, User, UserFilter};
|
use App\{Follower, Page, Profile, Status, User, UserFilter};
|
||||||
|
use App\Util\Localization\Localization;
|
||||||
|
|
||||||
class SiteController extends Controller
|
class SiteController extends Controller
|
||||||
{
|
{
|
||||||
|
@ -31,7 +32,7 @@ class SiteController extends Controller
|
||||||
public function changeLocale(Request $request, $locale)
|
public function changeLocale(Request $request, $locale)
|
||||||
{
|
{
|
||||||
// todo: add other locales after pushing new l10n strings
|
// todo: add other locales after pushing new l10n strings
|
||||||
$locales = ['en'];
|
$locales = Localization::languages();
|
||||||
if(in_array($locale, $locales)) {
|
if(in_array($locale, $locales)) {
|
||||||
session()->put('locale', $locale);
|
session()->put('locale', $locale);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue