eusonlito / GPS-Tracker

GPS Tracker platform for Sinotrack, Coban, Teltonika, Concox, Jimilab, OsmAnd and Queclink devices built with Laravel 11 + PHP 8.2 and MySQL 8. Plataforma GPS Tracker para dispositivos Sinotrack Sinotrack, Coban, Teltonika, Concox, Jimilab, OsmAnd y Queclink creada con Laravel 11 + PHP 8.2 y MySQL 8.
https://tracker-demo.lito.com.es/
MIT License
169 stars 73 forks source link

Cannot change language #29

Closed abosaad11 closed 10 months ago

abosaad11 commented 10 months ago

Hello

I spent a few hours trying to change the language to English without any luck, this is for a docker container.

I have a .env file in the root directory and in the /docker directory just to be sure. Both look like this:

APP_NAME="GPS Tracker"
APP_ENV=production
APP_KEY=
APP_DEBUG=false

# Configure this if you are using a web server as proxy
APP_URL=http://localhost:8092

# Configure the default language (es/en)
APP_LOCALE=en
...

I even made the following changes to /config/app.php:

'locale' => 'en',
'fallback_locale' => 'en',
...

I followed the README to the letter, but the container works in Spanish every single time. It won't change to English.

Please help, how am I supposed to change the language? Thank you

EDIT:

By complete accident I found http://192.168.1.10:8092/profile and I can change the language from there. Can I have the container boot into English by default?

eusonlito commented 10 months ago

Ok, spainsh is default system language, I need to update this setting to match with the default APP_LOCALE.

https://github.com/eusonlito/GPS-Tracker/blob/master/app/Domains/Language/Seeder/data/language.json

abosaad11 commented 10 months ago

Ok, spainsh is default system language, I need to update this setting to match with the default APP_LOCALE.

https://github.com/eusonlito/GPS-Tracker/blob/master/app/Domains/Language/Seeder/data/language.json

Thank you.

eusonlito commented 10 months ago

For now, you can change the default language from database:

UPDATE `language` SET `default` = IF(`code` = "en", TRUE, FALSE);
eusonlito commented 10 months ago

Solved from commit https://github.com/eusonlito/GPS-Tracker/commit/1f9fa0278906b5cec676e7a1ccd54f2695161d02

Now the default language is checked from .env instead the default column.