?? ?? ?? : ???/lang ?????? ? ?? (? : en, es)? ?? ?? ????? ??? messages.php ??? ????? JSON ??? ???? ??? ??????. 2. ?????? ?? ?? : ?? ?? ?? ??? ?? ????? ?? ??? ????? URL ???? ?? ??? ???? app ()-> setlocale ()? ???? ?? ??? ???? kernel.php? ????? ??????. 3. ?? ?? ?? : ?? ??? ???? __ (), trans () ?? @lang? ???? ??? ???? __ ()? ???? ?? ????. 4. ?? ?? ?? ? ?? : ??? ?? ?? ?? ? ?? : ?? ???? ??? ???? trans_choice ()? ???? '{0} ?? | {1} ??? ?? | [2,*]? ?? ??? ??? ??????. 5. ?? ?? ?? : config/app.php?? ??? ? fallback_locale? ???? ??? ?? ? ? ?? ???? ??? ?????. 6. ??? ?? ??? : ?? ??? ?? ???? ?? ?? ??? ??? ? ????. 7. ??? ?? ?? : API ?????? ?? ??? ?? ???? ??? ?? ? ????? ???? ?? ???? ?????. ?? : Laravel ????? ?? ??? ??? ? ??, __ () ??? ?? ??, ????? ??? ???? ???? ??? ??? ???? ?? ?? ??, ?? ? ??? ???????.
Laravel ??????? ????? ?? ??? ???? ???? ? ?? ?? ??? ?? ??? ? ? ????. Laravel? ?? ?? ? ??? ??? ?? ???? ?? ??? ?? ??? ?????. ??? ???? ???? ?????.

1. ?? ??? ??????
Laravel? resources/lang
????? ?? ???? ?????. ? ???? ?? ?? ???? (? : en
, es
, fr
)? ????.
?? ???? ? ?? ?? :

/?? /? /en messages.php /es messages.php
? : /resources/lang/en/messages.php
<? php ?? [ '??'=> '?? ????? ?? ?? ?????', '???'=> '???', ];
? : /resources/lang/es/messages.php

<? php ?? [ '??'=> 'bienvenido a nuestra amplicación', 'login'=> 'iniciar sesión', ];
Laravel? ????? ???? ?? ?? ??? (? : resources/lang/es.json
)? JSON ??? ??? ?? ????.
2. ?? ???? ???? ???? ??????
Laravel? App::setLocale()
???? ???? ??? ?????. ???? ???? ??? ???? ?? ??? ????? ?? ???????.
?? A : ???? (??)
???? ???? ?? ????? ????.
PHP Artisan Make : Middleware Setlocale
app/Http/Middleware/SetLocale.php
:
?? ?? ?? ($ request, \ Closure $ next) { $ locale = $ request-> ?? ( '?? ??', 'en'); // ???? ???? ????? (? : 'en', 'es') $ supportedLocales = [ 'en', 'es', 'fr']; if (! in_array ($ locale, $ supportedLocales)) { $ locale = 'en'; // ?? } app ()-> setlocale ($ locale); return $ ?? ($ ??); }
app/Http/Kernel.php
? $middleware
?? Route Group?? ????? ??????.
?? B : URL ?? ???
URL? ?? ???? ??? ?? ????.
route :: get ( '/{locale}/welcome', function ($ locale) { app ()-> setlocale ($ locale); return view ( '??'); });
?? ?? ?? ?? :
route :: prefix ( '{locale}')-> ???? ( 'set.locale')-> group (function () { route :: get ( '/welcome', [welcomecontroller :: class, 'index']); });
?? ?? ?? ?? ??? ?? ??? ???? ???? ??????.
3. ?? ???? ?? ??? ??????
Laravel? ?? ? ???? ?????? ? ?? ???? ?????.
__()
??? ?? :
<h1> {{__ ( 'messages.welcome')}} </h1> <p> {{__ ( 'message.login')}} </p>
?? JSON ?? :
<h1> {{__ ( '?? ????? ?? ?? ?????')} </h1>
@lang
Blade ?? ?? :
@lang ( 'messages.welcome')
?? :
@lang
?? ??? ?? ?? ???__()
?? ? ???? ???__()
?????.
?? ?? ??
?? ?? :
// ?? ?? '?????'=> '?????, : ??',
{{{__ ( 'messings.hello', [ 'name'=> 'John'])}}
4. ??? ? ??
Laravel? trans_choice()
??? ???? ???? ?????.
?? ??? ? :
'??'=> '{0} ?? ?? | {1} ??? ?? | [2,*] : ??? ??',
?? ?? ?? ? ?? :
'??'=> '??? ?? | : ??? ??',
??:
{{trans_choice ( 'messages.apples', 3)}}
? ?? : 3 apples
.
5. ?? ? ?? ? ??
Laravel? ??? ??? ?? ??? ( config/app.php
? ?? ?)?? ?????.
config/app.php
????? ??????.
'locale'=> 'en', 'fallback_locale'=> 'en',
Laravel? ???? ???? ?? ? ??? ????? ?? ? ? ????? ????? ? ?? ??? ?????.
6. ?? ?? (?? ??)
??????? ??? ?? ?? ??? ?? ? ? ????.
PHP Artisan ?? : ?? PHP ?? ?? : ??
Laravel? ????? lang:cache
???? ??? barryvdh/laravel-translation-manager
? ?? ???? ????? ??? ?? ??? ?? ?? ???? ??? ? ????.
7. JavaScript ?? (?? ??)
??? ??? ??? ??? ?? spatie/laravel-translatable
?? ?? ??? inertiajs/inertia
?? ??? ??? ????? ?? ?? ???? ?? ??? ??????.
route :: get ( '/translations/{locale}', function ($ locale) { $ translations = ?? ( '???', [], $ locale); return response ()-> json ($ translations); });
vue? ???? ?? vue-i18n
/ laravel-vue-i18n
? ?? ???? ??????.
??
?? ?? ????? ?? :
-
resources/lang/{locale}/
- ?? ? ??????
__()
??trans()
???? ?????? - ??, URL ?? ??? ??? ?? ??? ??????
- ????? ???? ???? ??????
- ?? ?? ? ???? ?????
- ?? ? ?? ? ?? ?????
????? ??? ?? ? ?? ??? ???? ?? ????? ?? ??? ? ????.
? ??? ?? ??????? ????? ??? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Stock Market GPT
? ??? ??? ?? AI ?? ?? ??

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

?? ? ?????? ?? : PhpartisanMake : ModelPost-M? ???? ?? ? ?????? ??? ???? ??? ??? ???? PhPartisanGiGrate? ??????. 2. ?? CRUD ?? : post :: all (), find (), create (), save () ? delete () ???? ???? ???? ??, ??, ???? ? ?????. 3. Eloquent Association ?? : ???? Solgsto ? Hasmany ??? ???? with () ???? ???? ?? ???? ?????? N 1 ?? ??? ?????. 4. ?? ?? : ?? ???? ???? ?? ??? ???

??? ?? ?? ??? ??? ?? ?? ?? ?? ???? ?? ?? ?? ? ?? ?? ?? ? ???, ???, oruserusingasingLeassociation.2. oruserusingAdAsingLeassociation.2

?, YouCancreateAcialnetworkwithLaravelByFollowingThesSteps : 1. SetuplaravelusingComposer, ConfiguretHe.envfile, enableAuthenticationViabreeze/jetstream/fortify, Andrunmigrations foruserManagement.2.implementcorefeatincludingusproffiles

Laravel? ??? ???? ???? PHP? ?? ??? ??? ???? ?? ? ? ??????. ?? Crontab? ???? ???? ?? ??? 1 ?? ? ?? ???? CRON ?? ? ??????? : *CD/PATH-to-YOURPROJECT && PHPARTISANSCHEDUL : RUN >>/dev/null2> & 1, ??? ?? ??? ?? ???? ???? ????. 1. ?? ??? $ ??? ?? ??, ?? ?? ?? ??? ??? ? ????.

?? ?? ?? : ???/lang ?????? ? ?? (? : en, es)? ?? ?? ????? ??? messages.php ??? ????? JSON ??? ???? ??? ??????. 2. ?????? ?? ?? : ?? ?? ?? ??? ?? ????? ?? ??? ????? URL ???? ?? ??? ???? app ()-> setlocale ()? ???? ?? ??? ???? kernel.php? ????? ??????. 3. ?? ?? ?? : ?? ??? ???? __ (), trans () ?? @lang? ???? ??? ???? __ ()? ???? ?? ????. 4. ?? ?? ?? ? ?? : ??? ?? ?? ????? ?? ???? ?????.

Laravel? ???? ??? ???? ????? ?? ??? ??? ???? ?????? ??? ???????. 2. Routes/API.php?? API ??? ???? ??? ????? ???? JSON ??? ?????. 3. Laravelsanctum? ?? API ??? ???? ??? ?? ? ????? ??? ?????. 4. ??? ??? ? ? ?? ??? ???? ?? ???? ???? ?? ?????? ??? ??? ????. 5. ?? ???? HTTPS, ?? ?? ??, CORS ??, API ?? ??? ???? ?? ??? ????????. API ???, ???, ? ? API ?? ??? ???? ?? ?? ? ??? ????? ?? ????. Laravel? ???? ??? ??????.

Laravelusesmonologtomessagesviathelogfacade, witlefaultLogsStoredInstorage/logss/laRavel.log.configureChannelSinconfig/logging.phptocontroloutput; thedefaultStackChannelAggatesmultipleAndlerLerslikesingle, whitesLog

??? ???? remember_token ?? ??? ??????. Laravel? ?? ???????? ??? ??? ???? ????. ??? ???, ??????? ?? ?????. 2. ??? ??? ??? ???? ???? ???? "??"??? ??????. 3. ???? ???? ????? ?? ?? ?? ?? ?? ?? ??? Auth :: ritch () ???? ?????. 4. "Remember Me"? ????? 5 ? ?? ???? config/auth.php? configuration ??? ?? ??? ?? ? ? ????. 5. Laravel? ????? ????? ??? ?? ? ? Semem_token? ???? ??????. ?? ???? ??? ???? ?? HTTP? ???? ?? ????. 6
