When to use live preview
Use live preview when text meaning depends on layout, styling, or surrounding content. Typical cases:- CMS pages with rich formatting.
- Product or marketing pages with embedded UI copy.
- Content with many short strings where context is critical.
Prerequisites
- A working plugin flow for project/job creation.
- Your tenant-specific TMS API base URL (for example
${TMS_BASE_URL}). - Access to source assets needed for preview rendering.
- A strategy for keeping preview assets aligned with source content.
Option A: HTML file localization
If your source can be represented as HTML, upload HTML directly as the translatable file. Pros:- Simplest setup.
- Immediate visual context.
- Not always feasible for CMS models with complex field structures.
- May require custom conversion logic from source model to HTML.
Option B: Preview package via API
If HTML-as-source is not feasible, upload a preview package and reference it during job creation.- Build a ZIP package with one HTML entry point plus relative assets.
- Upload package:
POST /api2/v1/projects/{projectUid}/jobPreviewPackage - Use the returned preview file UID in job creation metadata (
jobPreviewPackageFileUidRefin Memsource header).
Failure modes and safeguards
- Malformed package structure: validate ZIP before upload.
- Missing assets or incorrect relative paths: run package integrity checks in CI.
- Oversized package: enforce package size limits during build.
- Preview mismatch after source updates: re-generate preview package when content schema changes.
Next steps
Full Integration Workflow
Return to the production workflow and integrate preview where needed.
Error Handling & Limits
Validate limits and failure handling for preview flows.