Skip to content

Translation, Vision, Audit & Artifacts

Beyond text drafting, AI ships dedicated pipelines for multi-language localization, multimodal vision, pre-publish quality audits, and rendered marketing artifacts.

Multi-Language Localization & Protected Glossaries

Section titled “Multi-Language Localization & Protected Glossaries”
Glossaries enforce protected brand names and approved Source => Target translation pairs across every localization job.

Define a glossary (ai-glossaries) with domain_notes and protected_terms (one term per line to keep verbatim, or Source => Target pairs such as APA => Advance Provisioning Allowance (30%)), then translate strings or full LanguageSupport pages:

$ai = Ai::requireInstance($wire);
// 1. Translate a standalone text snippet
$translated = $ai->translate('Weekly yacht charter departing Gocek Marina.', 'tr', [
'glossary' => 'maritime-terms',
]);
// 2. Localize all translatable fields on a ProcessWire Page
$proposal = $ai->localize($yachtPage, 'tr', [
'glossary' => 'maritime-terms',
'apply' => true,
]);
// 3. Queue bulk localization via BulkTranslateQueue
$jobId = $ai->enqueueLocalization([1042, 1043, 1044], 'de', [
'glossary' => 'maritime-terms',
]);

For batch CLI localization, run:

Terminal window
php vendor/bin/wire ai:translate 1042 --to=tr --glossary=maritime-terms --queue --json

Requires the ai-image permission (or ai-admin) and a model assigned to the vision or image tier:

// Inspect an uploaded yacht photo for accessible alt text, caption, and focal point
$analysis = $ai->analyzeImage($yachtPage->getUnformatted('images')->first(), [
'locale' => 'en',
]);
// Generate a bespoke visual asset using the image tier
$generated = $ai->generateImage(
'Minimalist aerial photograph of a wooden gulet anchored in a turquoise Gocek cove at sunrise.',
['size' => '1536x1024']
);

Pre-Publish Content Audits (audit() & ai:audit)

Section titled “Pre-Publish Content Audits (audit() & ai:audit)”

AI combines zero-cost deterministic checks (missing alt text, empty meta descriptions, broken glossary terms, length violations) with optional reasoning-tier AI editorial review:

Terminal window
# Fast deterministic-only CI gate (zero LLM token cost)
php vendor/bin/wire ai:audit --template=yacht --deterministic-only --fail-on-issues --max-issues=0 --json
# Full AI + glossary audit across a specific locale
php vendor/bin/wire ai:audit --locale=tr --glossary=maritime-terms --limit=25 --format=table

Custom modules can inject additional audit signals and findings via the Ai::collectAuditSignals and Ai::collectAuditIssues hooks.

ArtifactService turns grounded page/entry data into downloadable visual assets (stored in site/assets/cache/ai-artifacts/ and queued via ArtifactGenerationQueue):

  • ImageOverlayRenderer: Renders branded social cards and listing overlays on top of yacht imagery.
  • BrochureHtmlRenderer: Generates print-ready HTML/PDF charter brochures from grounded fields.
  • QrCodeGenerator: Produces crisp QR codes linking to live charter proposals or booking pages.
  • ArtifactRendererInterface: Register custom artifact renderers via the Ai::collectArtifactRenderers hook.

Next steps