The notice
The marking is for tools. The notice is for people: a short line such as "Created using Generative AI" that a reader sees without any tool. The package keeps the two apart on purpose, so a page can carry either one without the other, and you decide where the notice goes.
<x-ai-content-marking::notice :marking="$description->marking" />
renders
<p class="ai-content-marking-notice">Created using Generative AI</p>
Where it appears
The notice renders in a p unless the configuration or the component asks for another element.
as picks one for a single notice, and the attributes you pass are kept, with your classes added
to ai-content-marking-notice:
<x-ai-content-marking::notice :marking="$marking" as="small" class="text-muted" />
The element is one of p, span, small, div, figcaption and aside. Any other element
throws an InvalidArgumentException, whether the component asks for it or the configuration names
it.
Which markings get one
By default the component renders a notice for the two terms that say generative AI was involved,
trainedAlgorithmicMedia and compositeWithTrainedAlgorithmicMedia. For a marking of any other
term it renders nothing. The list is ai-content-marking.notice.source_types in the
configuration.
The words
The package ships the words for both terms in seven languages, in the locale of the application:
| Locale | trainedAlgorithmicMedia | compositeWithTrainedAlgorithmicMedia |
|---|---|---|
en | Created using Generative AI | Edited using Generative AI |
de | Mit generativer KI erstellt | Mit generativer KI bearbeitet |
es | Creado con IA generativa | Editado con IA generativa |
fr | Créé avec l'IA générative | Modifié avec l'IA générative |
it | Creato con l'IA generativa | Modificato con l'IA generativa |
nl | Gemaakt met generatieve AI | Bewerkt met generatieve AI |
pt | Criado com IA generativa | Editado com IA generativa |
A regional locale shows the words of its language: pt-BR and pt-PT the pt words, de-AT
the de ones, a region nobody listed included.
The English words are the labels IPTC gives the two terms. To change them, publish the translations
and edit notice.<term> in lang/vendor/ai-content-marking/<locale>/messages.php. Words you
publish for a region, under lang/vendor/ai-content-marking/pt-BR/, win over the language's
term by term:
php artisan vendor:publish --tag=ai-content-marking-lang
A term you add to notice.source_types needs its words there as well. Without them the component
throws an InvalidArgumentException naming the term, rather than show a translation key to your
readers.
Without the component
Pushery\AiContentMarking\Notice gives the same answers to your own markup. Resolve it from the
container, or type-hint it wherever Laravel injects dependencies: label($marking) returns the
words, or null where no notice is configured for the term, and element() returns the configured
element.
use Pushery\AiContentMarking\Notice;
$notice = app(Notice::class);
$words = $notice->label($marking);
$element = $notice->element();