What templates are in this system
A letter template is the reusable definition of a document type. It belongs to a company, has a visibility mode, supports one or more languages, and contains per-language subject and content. Templates are not generated documents. They are the blueprint used later by requests and letters.
Core template features
- Company binding
- Internal or external visibility
- Active or inactive status
- Multi-language support through related language content
- TinyMCE-based rich-text editing
- Placeholder detection and display
- Validation status feedback
- Revision history and audit support
Internal
Use for admin-only or inside-the-organization document flows.
External
Use when employees should request the document from the employee portal.
Multilingual
Use when the same document type must print in more than one language without losing placeholder consistency.
How authoring actually works
- Create the template and choose the company.
- Choose
externalif employees should be able to request it; chooseinternalif it is intended for admin-only flows. - Select all languages you want the template to support.
- For each language, write a subject and a content body.
- Insert placeholders using the current delimiters, usually
[[placeholder_name]]. - Review the detected placeholder list and the validation status panel.
- Save only when every language version uses the same placeholder keys.
Why placeholder consistency matters
The text of a translated letter can and should change to sound natural in each language. The placeholder keys should not. The system needs a stable set of keys so it can merge values into every language version reliably.
Good:
English: [[employee_name]], [[purpose]]
Amharic: [[employee_name]], [[purpose]]
Bad:
English: [[employee_name]], [[purpose]]
Amharic: [[employee_name]], [[ዓላማ]]
What the editor validates
- Content is not empty
- Content meets a minimum useful length
- Placeholders can be parsed successfully
- Placeholder sets stay aligned across every language
Why revisions are important
Template mistakes are expensive because they affect every future letter that uses that template. The revision history page exists so teams can inspect version history, preview older versions, compare a version with the current state, and restore a prior version if a bad change ships.
Revision workflow highlights
- Versions are sorted newest-first.
- The current version is visually marked.
- Users can preview a historical version.
- Users can compare a historical version to the current version.
- Users can restore a historical version, which creates a new current state based on the old data.
Template design edge cases
- Changing delimiters later: existing template text may no longer parse the way you expect.
- Removing a language: think about whether employees still need to print historic letters in that language.
- Switching visibility: changing internal to external exposes the template to employees immediately if other conditions are met.
- Placeholder removal: deleting a placeholder from one language but not another usually creates validation trouble.
Sample body
<p>To whom it may concern,</p>
<p>This letter certifies that [[employee_name]] has been employed with [[company_name]]
as [[position]] in the [[department]] department since [[start_date]].</p>
<p>This certificate is issued upon the employee's request for [[purpose]].</p>
<p>Date: [[current_date]]<br>Reference: [[reference]]</p>