Translations

Many parameters provide a translatable alternative: when populated with an identifier for the native Laravel's localization ability, those assign a translated string to the reference attribute.

@php
App::setLocale('it');
@endphp

<x-larastrap::button tlabel="example.label" />
<button id="button-86b46e2351b4dcf328f7e9ef80cc3458" class="btn btn-primary">Questa è una etichetta</button>

button

  • tlabel translates label

field

Those attributes are inherited by all Inputs and other components usually used in Forms.

  • tlabel translates label
  • thelp translates help
  • tpophelp translates pophelp
@php
App::setLocale('it');
@endphp

<x-larastrap::text tlabel="example.name" />
<x-larastrap::email tlabel="example.email" />
<div class="row mb-3">
  <label for="input-f4e9c49cc856f6ef3a4f9645fa012136" class="col-4 col-form-label">Nome</label>
  <div class="col-8">
    <input id="input-f4e9c49cc856f6ef3a4f9645fa012136" type="text" class="form-control" name="Wo6KkJT6vM" value="">
  </div>
</div>
<div class="row mb-3">
  <label for="input-35a9a2402869a43d30048937620c4b20" class="col-4 col-form-label">Indirizzo E-Mail</label>
  <div class="col-8">
    <input id="input-35a9a2402869a43d30048937620c4b20" type="email" class="form-control" name="0urp1i84Y9" value="">
  </div>
</div>

input

  • tplaceholder translates placeholder
  • ttextprepend translates textprepend
  • ttextappend translates textappend

accordionitem

  • tlabel translates label

tabpane

  • tlabel translates label

Larastrap