Dear All
I'm newbie of Laravel. I would like to create a multi-language website currently. After follow the steps of mcamara/laravel-localization, it seems I can switch the langauge (eg: http://my-web-site/es/welcome). However, I don't know how I can translate the content in each page
Eg: {{ trans('contact_us.name') }}
I have created a es folder under resources/lang and also created a contact_us.php under the es folder, but it still can't translate the content accordingly
Would someone give me some advice?
Thanks, Jacky
I think you have read this below line from mcamara/laravel-localization:
If the locale is not present in the url or it is not defined in supportedLocales, the system will use the application default locale or the user's browser default locale (if defined in config file)
Check config file.
saurabhd said:
I think you have read this below line from mcamara/laravel-localization:
If the locale is not present in the url or it is not defined in supportedLocales, the system will use the application default locale or the user's browser default locale (if defined in config file)
Check config file.
Hi Saurabhd,
But the situation is I have followed the instruction to create the config/laravellocalization.php. After that I have cancel the remark of the languages I want. Eg: en, es, zh, zh-Hant
However, after that no matter I created es, zh or zh-Hant folder under resources/lang, it also didn't work
Would you please give me some idea?
Thanks, Jacky
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community