php newbie Posted June 25, 2015 Report Share Posted June 25, 2015 Tāds vienkāršs jautājums, kāpēc trans('messages.Hello'); tulko, bet trans('Hello'); nē? Quote Link to comment Share on other sites More sharing options...
briedis Posted June 25, 2015 Report Share Posted June 25, 2015 modulis.indekss Kāpēc lai tulkotu? Quote Link to comment Share on other sites More sharing options...
php newbie Posted June 25, 2015 Author Report Share Posted June 25, 2015 nezinu, tur it kā ir pēc noklusējuma 'messages' un default valodai strādā function trans($id = null, $parameters = array(), $domain = 'messages', $locale = null) ja man ir tikai viens modulis būtu forši lai nevajadzētu visu laiku to 'messages' rakstīt trans('messages.Hello') trans('messages.'.$hello) Quote Link to comment Share on other sites More sharing options...
php newbie Posted June 25, 2015 Author Report Share Posted June 25, 2015 es typoju ar 3 pirkstiem :D bet whatever, var failus nosaukt ar vienu burtu trans('a.Hello'); Quote Link to comment Share on other sites More sharing options...
jurchiks Posted June 26, 2015 Report Share Posted June 26, 2015 (edited) Nu priekš kam tā skopoties ar simboliem? "messages.Hello" uzreiz ir saprotams, kas tas par tekstu un aptuveni kam tas izmantojas, "a.Hello" var saprast tikai, kas tas par tekstu, bet ne tā pielietojumu. Anyway, es jau ieteiktu tādus tekstus saukt nevis burtiski kas tekstā par vārdiem, bet ko tas teksts pasaka, i.e. messages.Greeting (var būt Hello, var būt Sup nigga, ideja nemainās). Edited June 26, 2015 by jurchiks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.