xiCO2k / laravel-vue-i18n

Allows to connect your `Laravel` Framework translation files with `Vue`.
MIT License
621 stars 51 forks source link

how to change active lang to the new locale #45

Closed ibrahimRezk closed 2 years ago

ibrahimRezk commented 2 years ago

hello i'm using the package and i can chang locale and files comes from Lang folder can be changed to the new locale when using loadLanguageAsync() function but i can't chang active lang , it is always 'en' also any translated data comming from database remain the same in english not to the new locale i am using astrotomic laravel translatable i tried to change locale in config/app manually to check that astrotomic is working fine and it is working .

any help thank you

xiCO2k commented 2 years ago

if you pass the attribute lang on your <html> tag.

like <html lang="{{ app()->getLocale() }}"> it should follow what lang you have set on the backend side.