Class LaravelUi5\Sdk\I18n\Attributes\Translatable

final
readonly

Names the fields of a model that carry the tenant's further languages. The attribute declares; {@see \LaravelUi5\Sdk\I18n\Concerns\HasTranslations} acts — it reads these fields in the request's language and writes them through {@see \LaravelUi5\Sdk\I18n\TranslationWriter}.

#[Translatable(['title', 'description'])]
final class Item extends Model
{
    use HasTranslations;
}

The base language stays in each field's column; the further languages live in sdk_translations. Provisional until the first real multilingual project in Switzerland.

Methods
Properties