nafiesl / silsilah

A genealogy/family tree application, built with Laravel.
MIT License
600 stars 289 forks source link

Set default language #72

Closed nolbyte closed 3 years ago

nolbyte commented 3 years ago

Hi! Can we set default language to id when people open the page for the first time? Thank you

nafiesl commented 3 years ago

Hello @nolbyte, to change your default language, you can update this code: https://github.com/nafiesl/silsilah/blob/master/app/Http/Middleware/Lang.php#L18

To:

app()->setLocale(request('lang', session('lang', 'id')));

The default lang will be id.

nolbyte commented 3 years ago

Ok, done.