Jump to content
php.lv forumi

laravel trans()


php newbie

Recommended Posts

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)
Link to comment
Share on other sites

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 by jurchiks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...