<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Diogo Heleno</title>
    <description>The latest articles on DEV Community by Diogo Heleno (@diogoheleno).</description>
    <link>https://dev.to/diogoheleno</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3856271%2F9c35a5a2-9068-4e47-9795-fca17fffbd0c.jpg</url>
      <title>DEV Community: Diogo Heleno</title>
      <link>https://dev.to/diogoheleno</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/diogoheleno"/>
    <language>en</language>
    <item>
      <title>Building a Terminology Pipeline for Multilingual Regulatory Dossiers (HTA/JCA Use Case)</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Thu, 03 Dec 2026 08:53:45 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multilingual-regulatory-dossiers-htajca-use-case-36nb</link>
      <guid>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multilingual-regulatory-dossiers-htajca-use-case-36nb</guid>
      <description>&lt;p&gt;Pharma companies submitting Joint Clinical Assessment (JCA) dossiers under EU Regulation 2021/2282 have a document management problem that looks a lot like a software engineering problem: multiple contributors, multiple languages, multiple document versions, and zero tolerance for inconsistency.&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://www.m21global.com/en/blog/hta-dossier-translation-regulation-2021-2282/" rel="noopener noreferrer"&gt;M21Global article on HTA dossier translation&lt;/a&gt; covers the regulatory and linguistic side well: which documents need certified translation, which terms carry legal weight (&lt;code&gt;relative effectiveness&lt;/code&gt; vs &lt;code&gt;efficacy&lt;/code&gt;, for example), and how national certification rules differ between Portugal, Spain and France.&lt;/p&gt;

&lt;p&gt;That article is written for regulatory affairs teams. This one is for the people who end up building the internal tooling that keeps those dossiers consistent: the document pipeline, the terminology database, and the QA checks that catch mismatches before a national assessor does.&lt;/p&gt;

&lt;p&gt;If you work in medtech, pharma, or any regulated multilingual environment, this problem generalizes well beyond HTA.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual engineering problem
&lt;/h2&gt;

&lt;p&gt;A JCA dossier isn't one document. It's a bundle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pivotal clinical trial reports and structured summaries&lt;/li&gt;
&lt;li&gt;National regulatory authority opinions&lt;/li&gt;
&lt;li&gt;Scientific advice documentation&lt;/li&gt;
&lt;li&gt;PICO framework tables (Population, Intervention, Comparator, Outcome)&lt;/li&gt;
&lt;li&gt;Patient summaries for public disclosure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of these may be authored or translated by different teams, at different times, sometimes years apart, and they all reference the same restricted vocabulary. A term translated one way in the clinical report and another way in the PICO annex isn't a stylistic quirk, it's a flag for the assessment committee, and it triggers clarification requests that delay the whole submission timeline.&lt;/p&gt;

&lt;p&gt;This is a terminology consistency problem, and it's solvable with the same tools you'd use for any content ops pipeline: a source-of-truth glossary, automated checks, and version control.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Build a term base, not a glossary doc
&lt;/h2&gt;

&lt;p&gt;A shared spreadsheet is where these projects usually start and where they usually break. You want a structured term base that can be queried programmatically.&lt;/p&gt;

&lt;p&gt;At minimum, each entry needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"RE-001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"relative effectiveness"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"target_lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pt-PT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"approved_translation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"eficácia relativa"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"forbidden_translations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"eficácia"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"efetividade"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"context"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"HTA / JCA regulatory assessment, distinct from clinical efficacy"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"regulation_ref"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"EU 2021/2282"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"approved"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"last_reviewed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2025-01-15"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tools that support this structure out of the box:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;SDL MultiTerm&lt;/strong&gt; or &lt;strong&gt;phrase TMS&lt;/strong&gt; if you're already in a CAT tool ecosystem&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TBX (TermBase eXchange)&lt;/strong&gt; format if you need vendor-neutral interchange, it's an ISO standard (ISO 30042) built exactly for this&lt;/li&gt;
&lt;li&gt;A plain Postgres table with a &lt;code&gt;terms&lt;/code&gt; and &lt;code&gt;term_translations&lt;/code&gt; schema if you want something lightweight and queryable from your own scripts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That last option is underrated. You don't need enterprise CAT tooling to enforce consistency, you need a queryable source of truth and a linter.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Write a terminology linter
&lt;/h2&gt;

&lt;p&gt;Once you have a term base, checking a translated document against it is a straightforward text-matching problem. A minimal version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_termbase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_document&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"target_lang"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;forbidden&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"forbidden_translations"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;pattern&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rf&lt;/span&gt;&lt;span class="s2"&gt;"\b{re.escape(forbidden)}\b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;IGNORECASE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="n"&gt;matches&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pattern&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;findall&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc_text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"found"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;forbidden&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"expected"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"approved_translation"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"occurrences"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;matches&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;

&lt;span class="n"&gt;termbase&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_termbase&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"hta_termbase.json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"pico_summary_pt.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;check_document&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"pt-PT"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;issue&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Term {issue['term_id']}: found '{issue['found']}', expected '{issue['expected']}' ({issue['occurrences']}x)"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is deliberately naive, regex matching won't catch inflected forms or synonyms reliably. In production you'd want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Lemmatization (spaCy has solid models for Portuguese, Spanish, French, German)&lt;/li&gt;
&lt;li&gt;Fuzzy matching for near-miss terms&lt;/li&gt;
&lt;li&gt;A review queue for flagged segments rather than auto-rejection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But the core idea holds: run this as a CI check on every document before it goes to a human reviewer, the same way you'd lint code before a PR review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Version control for regulatory content
&lt;/h2&gt;

&lt;p&gt;Dossiers get amended. A PICO comparator changes, a clinical summary gets updated after a scientific consultation. Treat these documents the way you'd treat infrastructure config: in git, with meaningful diffs.&lt;/p&gt;

&lt;p&gt;Plain text formats (Markdown, XLIFF for translation segments) diff cleanly. Word documents and PDFs don't. If your translation vendor delivers &lt;code&gt;.docx&lt;/code&gt;, converting to XLIFF or a structured intermediate format before storage pays off the first time someone asks "what changed between the version submitted to EMA and the version sent to INFARMED."&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git diff --word-diff pico_summary_v1.xliff pico_summary_v2.xliff
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Automate the cross-document consistency check
&lt;/h2&gt;

&lt;p&gt;The real failure mode isn't a single bad translation, it's the same term translated two different ways across two documents that both feed the same assessment. A simple cross-check script over your corpus:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;defaultdict&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;find_inconsistencies&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;term_usage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;defaultdict&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;doc_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;documents&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;variant&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"approved_translation"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"forbidden_translations"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                    &lt;span class="n"&gt;term_usage&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;inconsistent&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;tid&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;usages&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;tid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;usages&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;term_usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;v&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;usages&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;inconsistent&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this across every document in the dossier bundle before submission. It's the regulatory equivalent of a schema validation step, cheap to run, expensive to skip.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits with certified translation requirements
&lt;/h2&gt;

&lt;p&gt;None of this tooling replaces certified translation where it's legally required. As the source article explains, Portugal has no sworn translator system, certification there comes from a lawyer or notary attesting fidelity to the original, while Spain and France use sworn translator systems with their own national rules. Automated QA doesn't satisfy that requirement, it's a layer that runs &lt;em&gt;before&lt;/em&gt; certification, so the certified translator isn't the one catching a terminology drift that should have been caught upstream.&lt;/p&gt;

&lt;p&gt;If you're a technical team supporting a regulatory affairs function, this pipeline is where you add value: consistent source documents, a maintained term base, and automated checks, so the certified translation step is validating accuracy, not fixing inconsistency.&lt;/p&gt;

&lt;p&gt;For the regulatory and certification side of HTA dossier translation, including which documents require certified translation under Regulation (EU) 2021/2282 and how requirements differ by Member State, see the full breakdown at &lt;a href="https://www.m21global.com/en/blog/hta-dossier-translation-regulation-2021-2282/" rel="noopener noreferrer"&gt;M21Global&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>python</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a Multilingual Document Pipeline for EU/Nordic Market Entry (Without Losing Your Mind)</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Wed, 02 Dec 2026 07:08:50 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-multilingual-document-pipeline-for-eunordic-market-entry-without-losing-your-mind-a0h</link>
      <guid>https://dev.to/diogoheleno/building-a-multilingual-document-pipeline-for-eunordic-market-entry-without-losing-your-mind-a0h</guid>
      <description>&lt;p&gt;Expanding into the Netherlands or the Nordics sounds straightforward on paper. English proficiency is high, the markets are digitized, and everyone assumes compliance will be simple. Then someone on the legal team asks for a certified Swedish translation of the articles of association by Friday, and suddenly it's not a business problem anymore, it's a pipeline problem.&lt;/p&gt;

&lt;p&gt;The business side of this — which documents need certified translation, which authorities require what, country by country — is covered well in &lt;a href="https://www.m21global.com/en/blog/translation-requirements-dutch-nordic-markets/" rel="noopener noreferrer"&gt;this article on translation requirements for Dutch and Nordic markets&lt;/a&gt;. This post is about the other half: if you're the engineer or ops person responsible for actually moving documents through translation, certification, and submission without it becoming a bottleneck, here's how to think about the system.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this becomes an engineering problem fast
&lt;/h2&gt;

&lt;p&gt;Once a company starts operating in 2+ of these markets (NL, SE, DK, NO, FI), you're not dealing with "translate this PDF" anymore. You're dealing with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multiple target languages with different legal requirements per document type&lt;/li&gt;
&lt;li&gt;Documents that change (contracts get amended, tax filings are periodic)&lt;/li&gt;
&lt;li&gt;A hard requirement that some translations be &lt;em&gt;certified&lt;/em&gt;, not just accurate&lt;/li&gt;
&lt;li&gt;Deadlines tied to registration windows, tenders, or hiring timelines&lt;/li&gt;
&lt;li&gt;Version control across legal, marketing, and technical content with very different quality bars&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If this is being handled via email threads and shared folders, it will break the moment you're filing in three countries simultaneously.&lt;/p&gt;

&lt;h2&gt;
  
  
  Separate your content into tiers, not just languages
&lt;/h2&gt;

&lt;p&gt;The source article makes a useful distinction between legal/regulatory accuracy and marketing effectiveness. Translate that distinction into your workflow by tiering content:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 1: Certified/regulatory&lt;/strong&gt; — articles of association, powers of attorney, tax filings, conformity certificates. These go through a certified translator or ISO 17100-type process. No machine translation, no shortcuts. Treat this like a compliance artifact with an audit trail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 2: Operational&lt;/strong&gt; — contracts, internal policies, HR documents. High accuracy required, native-language legal review recommended, but certification isn't always mandatory (check per country, per the breakdown in the source article).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tier 3: Marketing/commercial&lt;/strong&gt; — website copy, product pages, campaigns. This is where localisation (not translation) matters, and where MT + human post-editing is often good enough.&lt;/p&gt;

&lt;p&gt;Modeling this as metadata on each document (&lt;code&gt;tier&lt;/code&gt;, &lt;code&gt;target_locale&lt;/code&gt;, &lt;code&gt;certification_required: bool&lt;/code&gt;, &lt;code&gt;authority: KVK|Bolagsverket|...&lt;/code&gt;) lets you route automatically instead of manually deciding every time.&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal pipeline structure
&lt;/h2&gt;

&lt;p&gt;If you're building this from scratch, something like this works:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source_document
  → extraction (OCR/text extraction if scanned)
  → tier classification
  → routing:
      tier 1 → certified translation vendor API/queue
      tier 2 → TMS (translation management system) with legal glossary
      tier 3 → MT engine + post-editing queue
  → QA (terminology check, locale formatting)
  → certification stamp (if required)
  → archival + version tag
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tools that fit into this without much custom glue:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;TMS layer&lt;/strong&gt;: Phrase, Lokalise, or Crowdin for tiers 2/3, especially if you already manage product i18n strings there&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;MT for drafts&lt;/strong&gt;: DeepL's API handles Dutch and Nordic languages well for a first pass; never use raw MT output for tier 1&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminology management&lt;/strong&gt;: maintain a glossary per locale (DeepL and most TMS tools support glossary injection) so "articles of association" doesn't come back as five different phrasings across documents&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Certified vendor integration&lt;/strong&gt;: most certified translation providers (including agencies like M21Global) work via document upload + turnaround SLA rather than API, so budget manual handoff time into your pipeline, not instant automation&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Handling locale-specific formatting programmatically
&lt;/h2&gt;

&lt;p&gt;A chunk of "translation" work for marketing and even operational documents is just format localisation — dates, currency, number separators, units. Don't pay a human translator to fix &lt;code&gt;03/04/2024&lt;/code&gt; ambiguity. Handle it in code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;formatForLocale&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'date'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DateTimeFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;type&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s1"&gt;'currency'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NumberFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'currency'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="n"&gt;currency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;localeCurrencyMap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// NL: 3-4-2024, €1.234,56&lt;/span&gt;
&lt;span class="c1"&gt;// SE: 2024-04-03, 1 234,56 kr&lt;/span&gt;
&lt;span class="nf"&gt;formatForLocale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'2024-04-03'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'nl-NL'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'date'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;formatForLocale&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1234.56&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'sv-SE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'currency'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Using &lt;code&gt;Intl&lt;/code&gt; for this (available natively in JS, and equivalents in Python's &lt;code&gt;babel&lt;/code&gt;, Java's &lt;code&gt;java.text&lt;/code&gt;, etc.) removes an entire category of errors before documents ever reach a translator. It also means your translators are spending certified-translation budget on actual language work, not reformatting numbers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version control for legal documents is not optional
&lt;/h2&gt;

&lt;p&gt;Contracts and registration documents get amended. If you're not tracking which translated version corresponds to which source version, you will eventually submit a stale certified translation to a registry like the KVK or Bolagsverket, which means resubmission and delay.&lt;/p&gt;

&lt;p&gt;Treat translated legal documents like you'd treat infrastructure config:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git-track the source document (or at least hash it)&lt;/li&gt;
&lt;li&gt;Tag each translation with the source commit/hash it was derived from&lt;/li&gt;
&lt;li&gt;Invalidate and flag for retranslation on source changes, don't silently let it go stale&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A simple table in your internal systems does this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;doc_id&lt;/th&gt;
&lt;th&gt;source_hash&lt;/th&gt;
&lt;th&gt;locale&lt;/th&gt;
&lt;th&gt;status&lt;/th&gt;
&lt;th&gt;certified&lt;/th&gt;
&lt;th&gt;submitted_to&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;poa-2024-03&lt;/td&gt;
&lt;td&gt;a1b2c3&lt;/td&gt;
&lt;td&gt;sv-SE&lt;/td&gt;
&lt;td&gt;current&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;Bolagsverket&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;poa-2024-03&lt;/td&gt;
&lt;td&gt;a1b2c3&lt;/td&gt;
&lt;td&gt;fi-FI&lt;/td&gt;
&lt;td&gt;stale&lt;/td&gt;
&lt;td&gt;yes&lt;/td&gt;
&lt;td&gt;PRH&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That &lt;code&gt;stale&lt;/code&gt; flag should trigger a re-translation request automatically, not get discovered during an audit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't automate away the certification step
&lt;/h2&gt;

&lt;p&gt;It's tempting to treat certified translation as just another API call once everything else is automated. It isn't. Certification exists because a qualified human (or an ISO-certified process) is vouching for the accuracy of a legal document in front of a specific authority — KVK, Belastingdienst, Bolagsverket, Erhvussstyrelsen, Brønnøysundregistrene, PRH. That's a liability chain, not a data transformation.&lt;/p&gt;

&lt;p&gt;Build your pipeline to make the handoff to certified translators fast and well-structured (clean source documents, clear glossaries, explicit target authority), but don't try to remove the human step for tier 1 content. That's where the actual compliance value is, and it's the part the &lt;a href="https://www.m21global.com/en/blog/translation-requirements-dutch-nordic-markets/" rel="noopener noreferrer"&gt;source article&lt;/a&gt; covers in more depth, country by country.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Multilingual market entry into these countries isn't a translation problem you solve once. It's an ongoing pipeline with different quality bars, different legal requirements per country, and real deadlines. Tiering content, automating what's mechanical (formatting, routing, versioning), and keeping humans in the loop exactly where certification matters is what keeps this from turning into a recurring fire drill every time legal needs a new document translated.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>webdev</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a Terminology Pipeline for Multilingual Regulatory Filings</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Tue, 01 Dec 2026 15:38:22 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multilingual-regulatory-filings-38ka</link>
      <guid>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multilingual-regulatory-filings-38ka</guid>
      <description>&lt;p&gt;Environmental licensing isn't something most developers think about, but if you've ever built internal tooling for a compliance, legal, or engineering team, you've probably run into the same underlying problem: the same technical term has to mean exactly the same thing across dozens of documents, multiple languages, and several review cycles, or the whole submission bounces back.&lt;/p&gt;

&lt;p&gt;A recent article from M21Global (&lt;a href="https://www.m21global.com/en/blog/environmental-licensing-translation-eu-industrial/" rel="noopener noreferrer"&gt;Environmental Licensing Translation for EU Industrial Projects&lt;/a&gt;) breaks down why Environmental Impact Assessment (EIA) filings get rejected by licensing authorities, and terminology drift is the top offender. If "combustion plant" becomes "burning unit" somewhere in a 300-page annex, a reviewer assumes they're different pieces of equipment and sends the whole thing back for clarification. That's months of delay over a word choice.&lt;/p&gt;

&lt;p&gt;That's a solvable engineering problem. Here's how you'd actually build a pipeline to prevent it, instead of relying on a human catching it during proofreading.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is a data consistency problem, not just a translation problem
&lt;/h2&gt;

&lt;p&gt;An EIA filing isn't one document. It's a bundle: the full technical report, a non-technical public summary, safety data sheets, permits, site plans, monitoring schedules. Multiple translators or teams often touch different pieces in parallel because deadlines are fixed by regulation and there's no room to negotiate.&lt;/p&gt;

&lt;p&gt;That parallelism is exactly where consistency breaks. If you've worked on any system with multiple contributors writing to a shared vocabulary (think: microservices teams agreeing on event schema naming, or distributed teams writing API docs), you know the fix isn't "ask people to be careful." It's enforcing a single source of truth programmatically.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Build the glossary as structured data, not a spreadsheet
&lt;/h2&gt;

&lt;p&gt;Most technical translation workflows still start with a glossary in Excel. That works until you need to validate against it automatically. Instead, model it as structured data you can query:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ELV-001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Emission Limit Values"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"approved_translations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"pt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Valores Limite de Emissão"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"fr"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Valeurs Limites d'Émission"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"de"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Emissionsgrenzwerte"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"forbidden_variants"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"limiares de emissão"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"valores máximos de emissão"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"regulatory_reference"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Industrial Emissions Directive 2010/75/EU"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"audience"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"technical"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;audience&lt;/code&gt; field matters here. The source article points out that an EIA's full technical report and its Non-Technical Summary have completely different readers, one is a licensing officer, the other is a resident at a public hearing. Translating both with the same density is a documented mistake. Tagging terms by target audience lets you generate two valid outputs from one glossary instead of forcing a single translation to serve both.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Validate translated documents against the glossary automatically
&lt;/h2&gt;

&lt;p&gt;Once you have a structured glossary, you can run a simple consistency check across every translated document before it goes to human review. A basic version in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_terminology&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;approved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"approved_translations"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;forbidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"forbidden_variants"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;variant&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;forbidden&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;IGNORECASE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"found"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;variant&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"expected"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;approved&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This won't replace a linguist, but it catches the exact failure mode described in the source article: two different terms in the translated text referring to the same source concept. Run it as a CI step on every document before it's bundled for submission, the same way you'd lint code before merging.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Use translation memory to enforce consistency across the whole filing, not just one file
&lt;/h2&gt;

&lt;p&gt;Translation Memory (TM) tools (OmegaT, memoQ, Trados) store previously translated segments and suggest them when the same or similar text reappears. For a filing with dozens of annexes, this is what keeps terminology stable across documents translated weeks apart by different people.&lt;/p&gt;

&lt;p&gt;If you're building internal tooling rather than using a commercial CAT tool, a minimal TM lookup is just a key-value store keyed on normalized source segments:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_tm_match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;segment&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tm_store&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.9&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;normalized&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;segment&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;normalized&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;tm_store&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;tm_store&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;normalized&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="c1"&gt;# fallback: fuzzy match for near-identical segments&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;fuzzy_search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;normalized&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tm_store&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The fuzzy match threshold matters. Too loose and you get false consistency (forcing a wrong match), too strict and you lose the benefit entirely. Start around 0.85-0.9 on a standard Levenshtein ratio and tune based on false positive rate during review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 4: Don't let formatting validation be an afterthought
&lt;/h2&gt;

&lt;p&gt;The source article notes that site plans and monitoring tables get cross-checked by the authority against numbered references in the original drawings. If your pipeline strips formatting during translation (a common issue when text is extracted for machine translation and reinserted), you'll introduce a different class of failure that has nothing to do with word choice.&lt;/p&gt;

&lt;p&gt;If you're scripting any part of this, keep the original document structure intact:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Translate DOCX/XLSX in place using libraries like &lt;code&gt;python-docx&lt;/code&gt; or &lt;code&gt;openpyxl&lt;/code&gt;, mapping translated strings back into existing cells and paragraph objects&lt;/li&gt;
&lt;li&gt;Never round-trip through plain text extraction for documents with embedded tables or numbered figure references&lt;/li&gt;
&lt;li&gt;Validate post-translation that figure/table counts match the source document (a simple count comparison catches a surprising number of DTP errors)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Step 5: Track certification requirements as metadata, not tribal knowledge
&lt;/h2&gt;

&lt;p&gt;Different authorities require different levels of formalization: some accept a translator's statement, others require notarized or sworn translation, and the requirement changes by destination country, not by document type. If you're managing multiple filings across jurisdictions, this needs to live in your project metadata, not in someone's memory:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"destination_country"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"FR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"certification_required"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"sworn_translator"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"notes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Local sworn translation required, Portuguese notarization not recognized"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a small thing, but it's the kind of detail that causes resubmission if it's tracked informally across email threads instead of as a queryable field in your project tracker.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;None of this replaces qualified technical and legal review, regulatory filings have real legal weight and real deadlines. But the terminology drift, formatting breakage, and certification mix-ups that cause delays are largely preventable with the same discipline you'd apply to any multi-contributor data consistency problem: structured source of truth, automated validation, and metadata instead of tribal knowledge.&lt;/p&gt;

&lt;p&gt;If you're dealing with this at scale and don't want to build the tooling yourself, the original article covers how a managed technical translation workflow (glossary-first, multi-stage review under ISO 17100) handles this for EIA filings specifically: &lt;a href="https://www.m21global.com/en/blog/environmental-licensing-translation-eu-industrial/" rel="noopener noreferrer"&gt;Environmental Licensing Translation for EU Industrial Projects&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>devops</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Multilingual Legal Content Pipeline for EU E-Commerce Sites</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Mon, 30 Nov 2026 08:31:05 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-multilingual-legal-content-pipeline-for-eu-e-commerce-sites-4j5h</link>
      <guid>https://dev.to/diogoheleno/building-a-multilingual-legal-content-pipeline-for-eu-e-commerce-sites-4j5h</guid>
      <description>&lt;h2&gt;
  
  
  The problem nobody budgets for
&lt;/h2&gt;

&lt;p&gt;If you're building or maintaining an e-commerce platform that sells into multiple EU countries, there's a good chance your legal pages are an afterthought. One &lt;code&gt;terms.html&lt;/code&gt;, maybe translated once with a paid API call, deployed to every locale, and forgotten.&lt;/p&gt;

&lt;p&gt;That approach has a legal problem, which is well covered in &lt;a href="https://www.m21global.com/en/blog/translate-terms-privacy-policy-eu/" rel="noopener noreferrer"&gt;this breakdown of EU language requirements for terms and privacy policies&lt;/a&gt;. Short version: under the Consumer Rights Directive and GDPR Article 12, your terms and privacy policy need to exist in a language the consumer actually understands, not just English with a disclaimer.&lt;/p&gt;

&lt;p&gt;What that article doesn't cover, and what's actually relevant to the people shipping the code, is how to build the &lt;em&gt;pipeline&lt;/em&gt; that keeps these documents correct, versioned, and in sync across markets without manual copy-pasting every time legal changes a clause. That's what this post is about.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this isn't a normal i18n problem
&lt;/h2&gt;

&lt;p&gt;Standard i18n tooling (&lt;code&gt;react-intl&lt;/code&gt;, &lt;code&gt;i18next&lt;/code&gt;, Lokalise, Crowdin) is built around UI strings: short, reusable, forgiving of minor imprecision. Legal content is the opposite:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Long-form, structured text&lt;/strong&gt; with cross-references ("as defined in Section 4.2")&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero tolerance for terminology drift&lt;/strong&gt; between versions&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Jurisdiction-specific legal terms&lt;/strong&gt; that don't have a 1:1 translation (e.g. Germany's &lt;code&gt;Widerrufsrecht&lt;/code&gt; carries a specific statutory withdrawal period that a generic "right of cancellation" doesn't convey)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Audit requirements&lt;/strong&gt; — you need to prove what version a user agreed to, in what language, and when&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treating your privacy policy like a button label ("Submit" → "Soumettre") is how companies end up with seven inconsistent return policies and a GDPR complaint.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical architecture
&lt;/h2&gt;

&lt;p&gt;Here's a setup that works reasonably well for teams managing legal content across several EU markets.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Separate legal content from your i18n string files
&lt;/h3&gt;

&lt;p&gt;Don't dump legal text into the same JSON files as your UI copy. Keep it in versioned Markdown or structured documents per locale:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/legal
  /terms
    en.md
    de.md
    fr.md
    pl.md
    meta.json   # version, effective_date, reviewed_by, source_hash
  /privacy-policy
    en.md
    de.md
    ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each &lt;code&gt;meta.json&lt;/code&gt; tracks which source version a translation was derived from:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"version"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2024-06-1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_hash"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"a1b2c3d4"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"translated_at"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2024-06-03"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"reviewed_by"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"legal-translation-vendor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"effective_date"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2024-06-10"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  2. Diff the source before triggering retranslation
&lt;/h3&gt;

&lt;p&gt;You don't want a full retranslation every time someone fixes a typo. Hash the source content and only flag a translation as stale when the hash changes meaningfully:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;content_hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;hashlib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sha256&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;encode&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"utf-8"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;hexdigest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;needs_retranslation&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_source&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="kt"&gt;bool&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;content_hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;current_source&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="n"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"source_hash"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this as a CI check on your legal repo. If &lt;code&gt;needs_retranslation&lt;/code&gt; returns true for any locale, open a ticket or trigger a request to your translation vendor instead of silently deploying outdated text.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Use a translation memory, not a stateless API call
&lt;/h3&gt;

&lt;p&gt;Machine translation APIs (DeepL, Google Translate) are stateless by default: every call is independent, so terminology can drift between your terms and your privacy policy, or between v1 and v2 of the same document. For legal content you want:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;glossary&lt;/strong&gt; enforcing fixed translations for defined terms (data controller, processor, legal basis, withdrawal period)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;translation memory (TM)&lt;/strong&gt; that reuses previously approved segments instead of retranslating from scratch&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;DeepL's API supports glossaries directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;deepl&lt;/span&gt;

&lt;span class="n"&gt;translator&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;deepl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;Translator&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;auth_key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;glossary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;translator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;"legal-de"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;source_lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"EN"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"DE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;entries&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"right of withdrawal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Widerrufsrecht"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"data controller"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Verantwortlicher"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="s2"&gt;"data subject"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"betroffene Person"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;translator&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;translate_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;source_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;source_lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"EN"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"DE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is fine for drafts and internal review, &lt;strong&gt;but machine translation alone is not sufficient for publishing these documents live&lt;/strong&gt;. Use it to produce a first pass that a qualified legal translator reviews, not as the final output. A terminology mismatch in a withdrawal clause is a contract dispute waiting to happen, not a typo users will laugh off.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Gate deployment on review sign-off
&lt;/h3&gt;

&lt;p&gt;Treat legal translations like a migration: nothing goes live without sign-off recorded in your metadata. A simple CI gate:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="c1"&gt;# .github/workflows/legal-check.yml
&lt;/span&gt;&lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Legal content check&lt;/span&gt;
&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;pull_request&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;paths&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="s1"&gt;'legal/**'&lt;/span&gt;
&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;verify&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v4&lt;/span&gt;
      &lt;span class="p"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Check reviewed_by is set for all locales&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s"&gt;python scripts/check_legal_meta.py&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;check_legal_meta.py&lt;/code&gt; just fails the build if any &lt;code&gt;meta.json&lt;/code&gt; has a null &lt;code&gt;reviewed_by&lt;/code&gt; field for a locale that's about to be deployed. Crude, but effective at stopping an unreviewed machine translation from reaching production.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Log what the user agreed to
&lt;/h3&gt;

&lt;p&gt;When a user accepts your terms, store the locale and version, not just a boolean:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;consent_log&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;user_id&lt;/span&gt; &lt;span class="kt"&gt;UUID&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;document_type&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;     &lt;span class="c1"&gt;-- 'terms' | 'privacy_policy'&lt;/span&gt;
  &lt;span class="n"&gt;locale&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;            &lt;span class="c1"&gt;-- 'de', 'fr', 'pl'&lt;/span&gt;
  &lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;           &lt;span class="c1"&gt;-- '2024-06-1'&lt;/span&gt;
  &lt;span class="n"&gt;accepted_at&lt;/span&gt; &lt;span class="kt"&gt;TIMESTAMPTZ&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a dispute arises six months later, you need to reconstruct exactly which German-language version of your terms a specific user agreed to, not just that "terms were accepted."&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to draw the line between automation and legal review
&lt;/h2&gt;

&lt;p&gt;Automating the pipeline gets you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fast detection of stale translations when source content changes&lt;/li&gt;
&lt;li&gt;Consistent terminology via glossaries and TM&lt;/li&gt;
&lt;li&gt;A clean audit trail for compliance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It does &lt;strong&gt;not&lt;/strong&gt; replace a qualified legal translator validating the terminology against each destination country's consumer protection law. The source article covers this distinction well: these documents generally don't require &lt;em&gt;sworn&lt;/em&gt; translation for B2C EU sales, but they do need rigorous certified legal translation, which is a different bar than what an API gives you out of the box.&lt;/p&gt;

&lt;p&gt;If you're scaling into new EU markets, the engineering problem is making sure translated legal content stays in sync with your codebase and audit requirements. The legal problem, what actually needs translating and to what standard, is covered in detail in the &lt;a href="https://www.m21global.com/en/blog/translate-terms-privacy-policy-eu/" rel="noopener noreferrer"&gt;source article on translating terms and privacy policies for EU markets&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Build the pipeline so legal review is a gate, not an afterthought, and you'll avoid both the compliance risk and the 11pm Slack message asking why the Polish terms page still says "Lorem ipsum."&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>webdev</category>
      <category>legal</category>
      <category>devops</category>
    </item>
    <item>
      <title>Building a Multi-Language Content Pipeline for Belgian Market Compliance (Dutch/French/German)</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Sun, 29 Nov 2026 13:30:36 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-multi-language-content-pipeline-for-belgian-market-compliance-dutchfrenchgerman-2758</link>
      <guid>https://dev.to/diogoheleno/building-a-multi-language-content-pipeline-for-belgian-market-compliance-dutchfrenchgerman-2758</guid>
      <description>&lt;p&gt;If you're shipping a product or a SaaS platform into Belgium, you'll quickly discover that "support French and call it done" doesn't work. Belgium has three official languages split by region (Dutch in Flanders, French in Wallonia, German in the East Cantons, both in Brussels), and the split is legally enforced, not just a UX nicety. The background on &lt;em&gt;why&lt;/em&gt; this matters legally is covered well in &lt;a href="https://www.m21global.com/en/blog/language-requirements-selling-belgium/" rel="noopener noreferrer"&gt;this piece on Belgian language requirements&lt;/a&gt;. This article is about the &lt;em&gt;how&lt;/em&gt;: what does a technically sound i18n/l10n pipeline look like when "wrong language" isn't a UX bug, it's a compliance violation?&lt;/p&gt;

&lt;p&gt;Most i18n tutorials treat locale as a user preference. In Belgium, locale is closer to a legal routing key. That changes your architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Locale isn't just &lt;code&gt;fr-BE&lt;/code&gt; vs &lt;code&gt;nl-BE&lt;/code&gt;, it's a region-bound requirement
&lt;/h2&gt;

&lt;p&gt;The naive approach is to detect &lt;code&gt;Accept-Language&lt;/code&gt; and swap strings. That breaks down here because Belgian language obligations are tied to &lt;strong&gt;where the transaction or employment relationship is legally anchored&lt;/strong&gt;, not to user browser settings or even IP geolocation alone.&lt;/p&gt;

&lt;p&gt;Concretely, this means your data model needs at least three dimensions, not one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;locale_content   -&amp;gt; which language the string is rendered in
region_binding   -&amp;gt; Flanders / Wallonia / Brussels / East Cantons
legal_context    -&amp;gt; labelling, contract, marketing, correspondence
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A product sold to a Flemish address needs Dutch labelling regardless of the buyer's browser language. A Brussels-based employment contract needs a language matching the employer's registered office location, which is a business-registry fact, not a session variable.&lt;/p&gt;

&lt;p&gt;If your system only stores &lt;code&gt;locale&lt;/code&gt;, you can't answer "did this specific contract satisfy Flemish Taaldecreet requirements," because that answer depends on where the office or job post is registered, which lives in a completely different table.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical schema for compliance-aware content
&lt;/h2&gt;

&lt;p&gt;Here's a simplified version of a schema that actually holds up under audit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="n"&gt;legal_documents&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;id&lt;/span&gt; &lt;span class="kt"&gt;UUID&lt;/span&gt; &lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;document_type&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;-- 'labelling', 'employment_contract', 'terms_of_sale'&lt;/span&gt;
  &lt;span class="n"&gt;region_binding&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;-- 'flanders', 'wallonia', 'brussels', 'east_cantons'&lt;/span&gt;
  &lt;span class="n"&gt;required_locale&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;-- derived from region_binding + document_type&lt;/span&gt;
  &lt;span class="n"&gt;source_locale&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;translated_locale&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;translation_status&lt;/span&gt; &lt;span class="kt"&gt;TEXT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="kc"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;-- 'pending', 'machine', 'human_reviewed', 'certified'&lt;/span&gt;
  &lt;span class="n"&gt;reviewer_id&lt;/span&gt; &lt;span class="kt"&gt;UUID&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="nf"&gt;linguists&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;terminology_set_id&lt;/span&gt; &lt;span class="kt"&gt;UUID&lt;/span&gt; &lt;span class="k"&gt;REFERENCES&lt;/span&gt; &lt;span class="nf"&gt;glossaries&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;created_at&lt;/span&gt; &lt;span class="kt"&gt;TIMESTAMPTZ&lt;/span&gt; &lt;span class="k"&gt;DEFAULT&lt;/span&gt; &lt;span class="nb"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;terminology_set_id&lt;/code&gt; is the part teams usually skip, and it's the one that causes real disputes. If your product catalogue, your distribution contract and your packaging use three different translations of the same legal term (say, "warranty period"), you've created ambiguity that a court will interpret against you. More on that risk in the source article's section on employment contract nullity.&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating the region-to-language mapping
&lt;/h2&gt;

&lt;p&gt;You don't need a legal database to get the basic routing right. A static lookup table covering Belgian municipalities (NIS codes) to language region is public data (Belgium's Crossroads Bank for Enterprises, or CBE, publishes postal and administrative references). A simplified version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;regionByPostalPrefix&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// Flanders: 1500-3999, 8000-9999 (simplified ranges)&lt;/span&gt;
  &lt;span class="n"&gt;flanders&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1500&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;3999&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;8000&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;9999&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;wallonia&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;4000&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;7999&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;brussels&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;1299&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;resolveRequiredLanguage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;postalCode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;documentType&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;code&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;postalCode&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;regionByPostalPrefix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;brussels&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'fr'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'nl'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// bilingual&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;regionByPostalPrefix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;flanders&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'nl'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;regionByPostalPrefix&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;wallonia&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'fr'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s1"&gt;'fr'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'nl'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'de'&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// fallback: cover all three&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is intentionally crude. The point isn't that postal-code ranges are legally authoritative (they're not, always verify against the actual CBE registry for anything contractual), it's that this routing logic needs to exist &lt;em&gt;somewhere&lt;/em&gt; in your pipeline before content ships, rather than being a manual checklist someone runs once at launch and never again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where machine translation is fine, and where it isn't
&lt;/h2&gt;

&lt;p&gt;This is the part that maps directly onto engineering tradeoffs you already know: throughput vs. correctness guarantees.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Good fit for MT + light review:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Large product catalogues&lt;/li&gt;
&lt;li&gt;Internal FAQs&lt;/li&gt;
&lt;li&gt;Support documentation with low legal exposure&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Bad fit for MT alone:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Labelling text for regulated products (SDS, food labelling under EU Reg. 1169/2011)&lt;/li&gt;
&lt;li&gt;Employment contracts in Flemish or Walloon jurisdictions&lt;/li&gt;
&lt;li&gt;Distribution agreements and warranty terms&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The failure mode isn't "the translation reads awkwardly." It's that a single mistranslated clause in an employment contract can be ruled void in a dispute, and the exposure sits with the employer. That's a fundamentally different risk profile than a typo in an FAQ, and your pipeline should treat it that way, with a hard gate requiring human legal-translation review before publish, not an optional step.&lt;/p&gt;

&lt;p&gt;A simple way to enforce this in CI/CD-style content pipelines: tag documents by &lt;code&gt;document_type&lt;/code&gt; and block the publish step unless &lt;code&gt;translation_status = 'human_reviewed'&lt;/code&gt; for high-risk types.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="no"&gt;HIGH_RISK_TYPES&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s1"&gt;'employment_contract'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'labelling'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'distribution_agreement'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;can_publish&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;document_type&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="no"&gt;HIGH_RISK_TYPES&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;translation_status&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'human_reviewed'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'certified'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;translation_status&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'machine'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'human_reviewed'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'certified'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It's a trivial function, but having it enforced in code instead of in a wiki page is the difference between "we have a policy" and "we have a guarantee."&lt;/p&gt;

&lt;h2&gt;
  
  
  Terminology consistency across systems
&lt;/h2&gt;

&lt;p&gt;If your contracts, your CMS, and your packaging artwork are managed in three different tools (common: legal docs in a DMS, marketing copy in a headless CMS, labelling in a PLM/artwork system), terminology drift is almost guaranteed unless you centralize a glossary.&lt;/p&gt;

&lt;p&gt;A minimal workable setup:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One shared glossary (TBX or even a structured JSON/CSV) as the source of truth for regulated terms&lt;/li&gt;
&lt;li&gt;Each downstream system pulls from it via API or scheduled sync, instead of letting translators improvise per-document&lt;/li&gt;
&lt;li&gt;CI check that flags any published document using a term not present in, or inconsistent with, the glossary&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This isn't exotic tooling. Translation management systems (Phrase, Lokalise, Crowdin) support glossary enforcement out of the box, and even a simple regex-based linter against a term list catches a lot before it ever reaches a reviewer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Belgium is a useful stress test for any i18n pipeline because it exposes the gap between "translated" and "compliant." If your system treats locale as a cosmetic setting, you'll pass every UI test and still fail a labelling inspection or lose a contract dispute. Build the region binding and document-risk tier into your data model early, automate the routing, and reserve human review for the documents where a mistranslation has legal teeth, not just reputational cost.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>webdev</category>
      <category>devops</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Language-Aware Guardrail Layer for LLM Apps (So You Stop Shipping English Errors to Spanish Users)</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Sat, 28 Nov 2026 08:48:08 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-language-aware-guardrail-layer-for-llm-apps-so-you-stop-shipping-english-errors-to-1c</link>
      <guid>https://dev.to/diogoheleno/building-a-language-aware-guardrail-layer-for-llm-apps-so-you-stop-shipping-english-errors-to-1c</guid>
      <description>&lt;p&gt;If you've shipped a multilingual product with an LLM in the loop, you've probably hit this bug: a user chats in Portuguese, the model replies in English halfway through, and nobody notices until a support ticket shows up. This isn't a translation bug in the traditional sense. It's an architecture gap.&lt;/p&gt;

&lt;p&gt;A good write-up on the problem space is &lt;a href="https://www.m21global.com/en/blog/localising-generative-ai-products/" rel="noopener noreferrer"&gt;this article on localising generative AI products&lt;/a&gt;, which breaks down why static i18n workflows don't map cleanly onto generated text. That article is aimed at product and localisation teams. This one is for the people who actually have to build the thing: what does a language-aware guardrail layer look like in code, and where do you draw the line between "let the model handle it" and "never let the model touch this"?&lt;/p&gt;

&lt;h2&gt;
  
  
  The three layers, from an engineering point of view
&lt;/h2&gt;

&lt;p&gt;You've got three places where language matters, and they need completely different tooling:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Static UI strings&lt;/strong&gt; — solved problem. &lt;code&gt;i18next&lt;/code&gt;, &lt;code&gt;react-intl&lt;/code&gt;, &lt;code&gt;.po&lt;/code&gt; files, whatever. Not interesting here.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System prompts&lt;/strong&gt; — these are code, but they're rarely treated like code. They get hardcoded in English, then someone pastes them into a translation tool once and forgets about them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generated output&lt;/strong&gt; — no fixed string exists. You're not translating text, you're constraining a distribution.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most multilingual incidents come from treating layer 3 like layer 1, or not treating layer 2 as a first-class config at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Don't let the model author your compliance text
&lt;/h2&gt;

&lt;p&gt;The single highest-leverage fix: pull anything with legal, safety, or compliance weight out of the generative path entirely. Let the model narrate around it, but inject the actual warning as a fixed, versioned string.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// bad: model phrases the warning itself&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userMessage&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Warn the user this advice is not a medical diagnosis."&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// better: deterministic injection, model fills in the conversational part&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;DISCLAIMERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;en&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"This is not a medical diagnosis. Consult a professional."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;pt&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Isto não é um diagnóstico médico. Consulte um profissional."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;es&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Esto no es un diagnóstico médico. Consulte a un profesional."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="n"&gt;llm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;messages&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;history&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;userMessage&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;system&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Respond helpfully. Do not add medical disclaimers yourself; one will be appended."&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;finalReply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sb"&gt;`${reply}\n\n${DISCLAIMERS[detectedLang] ?? DISCLAIMERS.en}`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This gives you two things for free:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Auditability&lt;/strong&gt;: if a regulator or legal team wants every warning your app can show, you &lt;code&gt;grep DISCLAIMERS&lt;/code&gt; and hand over a static list, not a log of generated text that varies between runs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Versioning&lt;/strong&gt;: you can diff the warning text across releases, run it through normal translation review, and know exactly when it changed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Treat &lt;code&gt;DISCLAIMERS&lt;/code&gt;, error messages, and anything safety-critical as config, reviewed and translated the same way you'd handle any other resource file. Don't let it live inside a prompt string.&lt;/p&gt;

&lt;h2&gt;
  
  
  Localise the system prompt, not just the output
&lt;/h2&gt;

&lt;p&gt;System prompts encode behavioural instructions — tone, register, refusal style. If your system prompt says "be concise and professional" in English and you rely on the model to generically apply that instruction while replying in Japanese, you'll get inconsistent register. A literal translation of the instruction itself isn't the fix either; "concise and professional" maps to different defaults in different languages and cultures.&lt;/p&gt;

&lt;p&gt;Treat system prompts as localisable artifacts with their own review cycle:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SYSTEM_PROMPTS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;en&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Respond concisely, in a professional tone suited to B2B software support."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;de&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Antworten Sie präzise und in einem formellen, professionellen Ton, wie es im B2B-Softwaresupport üblich ist."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;pt_BR&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Responda de forma clara e acessível, mantendo um tom profissional mas próximo, adequado ao suporte de software B2B."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;buildSystemPrompt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="no"&gt;SYSTEM_PROMPTS&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;??&lt;/span&gt; &lt;span class="no"&gt;SYSTEM_PROMPTS&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;en&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note the German and Brazilian Portuguese versions aren't translations of each other. They're adapted instructions written for how formality actually works in each market. This needs input from someone who knows the register expectations, not just a bilingual engineer.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing behaviour, not strings
&lt;/h2&gt;

&lt;p&gt;This is the part that trips up most CI setups. You can't unit test "the model replied correctly" the way you test a translated string's existence. You need scenario-based eval suites per language.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;test_scenarios&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"refund_request"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"es"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"input"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Quiero cancelar mi suscripción"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"refund_request"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pt"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"input"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Quero cancelar a minha subscrição"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"out_of_scope"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"fr"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"input"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Peux-tu me donner un conseil juridique ?"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;test_scenarios&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;reply&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;run_chat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;case&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"input"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;case&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;detect_language&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="k"&gt;case&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"language drift"&lt;/span&gt;
    &lt;span class="nf"&gt;assert_terminology_consistent&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;case&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="nf"&gt;assert_no_banned_phrases&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;risk_terms&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="k"&gt;case&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three checks matter most in practice:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Language drift detection&lt;/strong&gt;: run every reply through a language identifier (&lt;code&gt;fasttext&lt;/code&gt;'s &lt;code&gt;lid.176&lt;/code&gt; model works fine for this) and fail the test if output language doesn't match input language.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terminology consistency&lt;/strong&gt;: maintain a per-language glossary and flag replies that use inconsistent terms for the same concept across a conversation. Simple string matching against a glossary dict catches most of it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Refusal behaviour&lt;/strong&gt;: boundary cases (the model declining to answer) need their own test set per language, because refusal phrasing and what triggers it culturally differ. A refusal that reads as polite in Japanese can read as evasive translated literally into English.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Routing review effort by risk, not by volume
&lt;/h2&gt;

&lt;p&gt;Not everything needs a human linguist in the loop. A useful split:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High risk&lt;/strong&gt; (legal, safety, compliance): fixed strings, translated and reviewed by a second linguist, version-controlled like any other config.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium risk&lt;/strong&gt; (general UI, system prompts): machine-translated with a human post-edit pass, especially for system prompts where tone matters.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Low risk, high volume&lt;/strong&gt; (FAQ banks, prompt test fixtures): machine translation with spot-checks on the segments your eval suite flags as error-prone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This mirrors how solid SaaS localisation pipelines are structured generally, something covered in more depth in &lt;a href="https://m21global.com/en/blog/iso-17100-localization-for-saas-platforms" rel="noopener noreferrer"&gt;this piece on ISO 17100 workflows for SaaS platforms&lt;/a&gt;. The pattern holds for AI products: separate content by risk, match the review intensity to the risk, don't apply one workflow to everything.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway for implementation
&lt;/h2&gt;

&lt;p&gt;If you're building multilingual AI features, the fix isn't "add more languages to the system prompt." It's architectural:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pull compliance and safety text out of the generative path into versioned, reviewed config.&lt;/li&gt;
&lt;li&gt;Treat system prompts as localised artifacts, not English strings the model generalises from.&lt;/li&gt;
&lt;li&gt;Build scenario-based eval suites per language that check behaviour (drift, terminology, refusals), not just string presence.&lt;/li&gt;
&lt;li&gt;Route human review effort based on risk, not uniformly across all content.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of this requires exotic tooling. It requires treating language as a first-class dimension of your test matrix, the same way you already treat browsers or device sizes.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>i18n</category>
      <category>webdev</category>
      <category>testing</category>
    </item>
    <item>
      <title>Building a Translation Memory Pipeline for Multilingual Press Releases</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Fri, 27 Nov 2026 08:23:03 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-translation-memory-pipeline-for-multilingual-press-releases-iee</link>
      <guid>https://dev.to/diogoheleno/building-a-translation-memory-pipeline-for-multilingual-press-releases-iee</guid>
      <description>&lt;p&gt;Most engineering teams treat localization as a problem for the content or PR team to solve manually: copy-paste into a doc, send to a translator, wait, paste back into the CMS. That workflow falls apart the moment you're publishing press releases in six markets on overlapping schedules, with a brand glossary that needs to stay consistent across all of them.&lt;/p&gt;

&lt;p&gt;There's a good write-up on the editorial side of this problem in &lt;a href="https://www.m21global.com/en/blog/translating-press-releases-international-markets/" rel="noopener noreferrer"&gt;this article on translating press releases for international markets&lt;/a&gt;, which covers why a press release needs localization rather than plain translation (tone, register, spokesperson quotes, cultural references). That's the right framing for the content problem. This post is about the technical problem underneath it: how do you build a pipeline that keeps terminology consistent, avoids re-translating the same boilerplate every quarter, and gives human translators the right context instead of a wall of plain text.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core problem: press releases are structured documents pretending to be prose
&lt;/h2&gt;

&lt;p&gt;A press release looks like free-flowing text, but it almost always has a repeatable skeleton:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Headline&lt;/li&gt;
&lt;li&gt;Dateline&lt;/li&gt;
&lt;li&gt;Lead paragraph&lt;/li&gt;
&lt;li&gt;Spokesperson quote(s)&lt;/li&gt;
&lt;li&gt;Boilerplate "About [Company]" paragraph&lt;/li&gt;
&lt;li&gt;Contact information&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The boilerplate and contact block rarely change between releases. The spokesperson quotes change every time but often reuse the same job titles and department names. If your translation workflow treats every new release as a brand-new document, you're paying (in time or money) to re-translate content that's 80% identical to last quarter's release.&lt;/p&gt;

&lt;p&gt;This is exactly what translation memory (TM) systems solve, and it's underused outside of localization-heavy companies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Translation memory: the technical mechanism
&lt;/h2&gt;

&lt;p&gt;A TM is a database of source-segment/target-segment pairs. When new content comes in, the system fuzzy-matches each sentence or paragraph against stored segments and returns a similarity score.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="n"&gt;Segment&lt;/span&gt; &lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="n"&gt;EN&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"John Smith, Chief Technology Officer at Acme Corp, said: ..."&lt;/span&gt;
&lt;span class="n"&gt;TM&lt;/span&gt; &lt;span class="n"&gt;match&lt;/span&gt; &lt;span class="err"&gt;(&lt;/span&gt;&lt;span class="n"&gt;PT&lt;/span&gt;&lt;span class="err"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"João Silva, Diretor de Tecnologia da Acme Corp, afirmou: ..."&lt;/span&gt;
&lt;span class="n"&gt;Match&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;92&lt;/span&gt;&lt;span class="err"&gt;%&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A 92% match means the translator edits instead of starting from scratch, which cuts turnaround time and, more importantly, keeps the job title translation ("Chief Technology Officer" → "Diretor de Tecnologia") locked in across every release where that title appears.&lt;/p&gt;

&lt;p&gt;Tools that support this out of the box:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Trados Studio&lt;/strong&gt; / &lt;strong&gt;memoQ&lt;/strong&gt;: industry standard, file-based or server-based TM, good API support for CI integration&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Phrase (formerly Memsource)&lt;/strong&gt;: API-first, built for connecting to CMS and CI pipelines&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lokalise&lt;/strong&gt;: popular for product UI strings, works reasonably well for marketing content too&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Weblate&lt;/strong&gt; (self-hosted, open source): if you don't want vendor lock-in and already run your own infra&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Wiring a glossary into the pipeline, not just a spreadsheet
&lt;/h2&gt;

&lt;p&gt;The source article mentions maintaining a brand glossary. In practice, a static spreadsheet glossary dies within two quarters because nobody updates it consistently. The fix is to make the glossary a dependency the translation tool enforces automatically, not a reference document people are supposed to remember to check.&lt;/p&gt;

&lt;p&gt;Most TM platforms support term bases with an API:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="no"&gt;API_BASE&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"https://api.phrase.com/v2"&lt;/span&gt;
&lt;span class="no"&gt;PROJECT_ID&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"your_project_id"&lt;/span&gt;
&lt;span class="no"&gt;HEADERS&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"Authorization"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"token {API_TOKEN}"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;# Push a new approved term into the glossary&lt;/span&gt;
&lt;span class="n"&gt;term&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Chief Technology Officer"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="s2"&gt;"translations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"locale_code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"pt-BR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Diretor de Tecnologia"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"locale_code"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"de-DE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"content"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Technischer Leiter"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;resp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"{API_BASE}/projects/{PROJECT_ID}/glossary_terms"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="no"&gt;HEADERS&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the term base is populated, the translation tool flags any segment where a translator's output diverges from the approved term, during QA, not after publication. That's the mechanism that actually prevents the "CEO title translated three different ways across three languages" problem mentioned in the source article. A glossary that isn't enforced programmatically is a wish, not a safeguard.&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal CI pipeline for release translation
&lt;/h2&gt;

&lt;p&gt;If your press releases live in a CMS or a markdown repo, you can automate the handoff to translators instead of doing it over email:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Trigger&lt;/strong&gt;: new release draft merged into a &lt;code&gt;releases/en/&lt;/code&gt; folder&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Extraction&lt;/strong&gt;: script pulls the markdown, strips formatting, segments by paragraph&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TM lookup&lt;/strong&gt;: send segments to the TM API, get back matches above a confidence threshold auto-filled, everything else flagged for human translation&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Human pass&lt;/strong&gt;: translator (or agency) receives only the unmatched or low-confidence segments, inside the platform's editor, with full context (not a bare spreadsheet)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review&lt;/strong&gt;: second linguist review, which matches the kind of audited workflow described for institutional communication in the source article&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reinjection&lt;/strong&gt;: translated markdown pushed back into &lt;code&gt;releases/{locale}/&lt;/code&gt;, PR opened automatically&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A rough version of step 2-3 in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;segment_release&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;markdown_text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;# naive paragraph-based segmentation&lt;/span&gt;
    &lt;span class="n"&gt;segments&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;markdown_text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"\n\n"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;p&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;segments&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_tm&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;segments&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tm_client&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.85&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;results&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;seg&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;segments&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;tm_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fuzzy_match&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;results&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;seg&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"suggestion"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"score"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s2"&gt;"needs_human"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="k"&gt;match&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;threshold&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;results&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This isn't a replacement for a human translator on brand-sensitive content. It's a way to stop paying a translator to redo work on your boilerplate and contact block every single quarter, and to make sure "Chief Technology Officer" doesn't drift into three different translations because three different people worked on three different releases.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this breaks down
&lt;/h2&gt;

&lt;p&gt;TM and glossary enforcement work well for structural and terminological consistency. They do nothing for tone, idiom, or the register shifts the source article talks about (a German release reading as more formal than a Spanish one). That part stays a human judgment call, and it's the right call to outsource to someone who works in that market daily, not something to automate.&lt;/p&gt;

&lt;p&gt;What the pipeline buys you is speed and consistency on the parts that are mechanical, so the human translator's time goes entirely into the parts that actually require judgment: the quote that needs rewriting to sound natural in English, the cultural reference that doesn't travel, the opening line that needs a different hook for a different newsroom.&lt;/p&gt;

&lt;p&gt;If you're setting this up for the first time, start small: build the glossary and TM for one language pair, wire it into your release process, and only then scale to additional markets. Trying to stand up six language pipelines at once before you've validated the terminology list is how glossaries become spreadsheets nobody trusts.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>automation</category>
      <category>devops</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a Terminology Pipeline for Multilingual Clinical Trial Documents</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Thu, 26 Nov 2026 09:13:07 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multilingual-clinical-trial-documents-43b1</link>
      <guid>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multilingual-clinical-trial-documents-43b1</guid>
      <description>&lt;p&gt;Clinical trial documentation is one of the few domains where a mistranslated word can trigger a regulatory hold, not just an awkward sentence. &lt;a href="https://www.m21global.com/en/blog/clinical-trial-glossary-translation/" rel="noopener noreferrer"&gt;M21Global's piece on clinical trial glossaries&lt;/a&gt; makes the case well: build the glossary before translation starts, not after. That's solid advice from a linguistic and regulatory standpoint.&lt;/p&gt;

&lt;p&gt;What it doesn't cover is how to actually build and maintain that glossary as a system, instead of a spreadsheet that goes stale after week two. If you're a developer supporting a regulatory affairs team, a CRO, or a pharma company's localization stack, this is the part you'll end up owning.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this is a data problem, not just a translation problem
&lt;/h2&gt;

&lt;p&gt;A clinical trial glossary is terminology plus metadata: source term, approved translation per locale, authority source (MedDRA, SNOMED CT, internal style guide), status (draft/approved/deprecated), and which documents reference it. Treating this as a flat list of word pairs breaks down fast once you have 6+ languages and dozens of documents referencing the same terms.&lt;/p&gt;

&lt;p&gt;This is a textbook case for a &lt;strong&gt;termbase&lt;/strong&gt; backed by a real data model, not a Word document with tracked changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal schema for a clinical trial termbase
&lt;/h2&gt;

&lt;p&gt;Here's a structure that scales past the "single glossary.xlsx" stage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"AE-001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"adverse event"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"domain"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"regulatory"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"authority_ref"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MedDRA PT 10002272"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"definition"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Any untoward medical occurrence in a patient..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"translations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"pt-PT"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"acontecimento adverso"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"approved"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MedDRA official PT translation"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"pt-BR"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"evento adverso"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"approved"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MedDRA official BR translation"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"pl-PL"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;"term"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"zdarzenie niepożądane"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"approved"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nl"&gt;"source"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"MedDRA official PL translation"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"do_not_use"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"side effect"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"adverse occurrence"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"documents"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"protocol_v2.docx"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"icf_master.docx"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the &lt;code&gt;do_not_use&lt;/code&gt; field. This is where you encode exactly the problem the source article describes: the same concept drifting into "adverse event", "adverse occurrence", and "side effect" across six translators. Most CAT tools let you flag forbidden terms, but you have to actually populate that list from a terminology audit, it won't appear on its own.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extracting candidate terms automatically
&lt;/h2&gt;

&lt;p&gt;Before a human (medical writer or regulatory lead, as the source article rightly insists) validates anything, you can cut the manual search space dramatically with NLP term extraction.&lt;/p&gt;

&lt;p&gt;A simple pipeline:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;spacy&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;collections&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Counter&lt;/span&gt;

&lt;span class="n"&gt;nlp&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;spacy&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"en_core_web_sm"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;extract_candidate_terms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;min_freq&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;nlp&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;noun_chunks&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;chunk&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;chunk&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;noun_chunks&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="n"&gt;freq&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Counter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;noun_chunks&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;term&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;freq&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;min_freq&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"protocol_draft.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;candidates&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;extract_candidate_terms&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;candidates&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This won't replace a terminologist, it just gives them a prioritized list instead of a blank document. For production use, pair it with a MedDRA/SNOMED lookup to flag which candidates already map to a controlled vocabulary term, so the human reviewer spends time on genuinely ambiguous cases, not re-validating "informed consent" for the hundredth time.&lt;/p&gt;

&lt;h2&gt;
  
  
  Wiring the termbase into your translation workflow
&lt;/h2&gt;

&lt;p&gt;Once the glossary exists, it needs to be enforced, not just referenced. Most professional CAT tools (memoQ, Trados, Phrase) support termbase import via TBX (TermBase eXchange), an XML standard built for this.&lt;/p&gt;

&lt;p&gt;A basic TBX entry looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;termEntry&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"AE-001"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;langSet&lt;/span&gt; &lt;span class="na"&gt;xml:lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"en"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;tig&amp;gt;&amp;lt;term&amp;gt;&lt;/span&gt;adverse event&lt;span class="nt"&gt;&amp;lt;/term&amp;gt;&amp;lt;/tig&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/langSet&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;langSet&lt;/span&gt; &lt;span class="na"&gt;xml:lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"pt-PT"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;tig&amp;gt;&amp;lt;term&amp;gt;&lt;/span&gt;acontecimento adverso&lt;span class="nt"&gt;&amp;lt;/term&amp;gt;&amp;lt;/tig&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/langSet&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;langSet&lt;/span&gt; &lt;span class="na"&gt;xml:lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"pl-PL"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;tig&amp;gt;&amp;lt;term&amp;gt;&lt;/span&gt;zdarzenie niepożądane&lt;span class="nt"&gt;&amp;lt;/term&amp;gt;&amp;lt;/tig&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/langSet&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/termEntry&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If your termbase lives in a database (recommended once you're past ~500 terms), generate TBX programmatically on each glossary update and push it into the CAT tool via API or scheduled sync. This closes the loop the source article flags as the biggest risk: a glossary built after translation is already underway. If the termbase updates trigger automatic re-validation flags in open translation jobs, inconsistencies get caught before delivery, not after a regulator notices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Consistency checks before submission
&lt;/h2&gt;

&lt;p&gt;Even with a termbase enforced during translation, run an automated QA pass across the final documents. Tools like Xbench or a custom script comparing extracted terms across translated files can catch cross-document drift, exactly the "protocol says X, consent form says Y" problem described in the source article.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_consistency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc_terms&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;term_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;approved&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;termbase&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;approved&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"translations"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"term"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;found_variants&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;doc_terms&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;term_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;found_variants&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;term_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;found_variants&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this across every document in the submission package (protocol, ICF, investigator's brochure, labeling) before anything goes to the regulator.&lt;/p&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;The terminology principles in the source article are correct: validate with clinical experts, follow authority sources like MedDRA, lock the glossary before translation starts. But principles don't enforce themselves across 6 languages and a dozen documents. If you're building the tooling side of a multilingual regulatory pipeline, treat the glossary as a versioned, queryable data asset with automated extraction, TBX-based enforcement, and cross-document QA, not a document someone edits in parallel with the translators.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>python</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Building a Terminology Pipeline for Multi-Entity Financial Reporting</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Wed, 25 Nov 2026 10:26:58 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multi-entity-financial-reporting-4o1</link>
      <guid>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-multi-entity-financial-reporting-4o1</guid>
      <description>&lt;p&gt;If you've ever worked on internal tooling for a finance team at a multinational, you know the closing cycle is basically a distributed systems problem wearing a spreadsheet costume. Multiple subsidiaries, multiple fiscal calendars, multiple languages, and one consolidated report at the end that all of it has to reconcile into.&lt;/p&gt;

&lt;p&gt;There's a good article from M21Global about &lt;a href="https://www.m21global.com/en/blog/translating-year-end-statements-multinational-group/" rel="noopener noreferrer"&gt;translating year-end statements for multinational groups&lt;/a&gt; that covers the process side of this: mapping documents before close, matching review levels to risk, negotiating deadlines with translation vendors. Worth reading if you're on the finance or ops side.&lt;/p&gt;

&lt;p&gt;This post is for the people who get pulled in to actually build something around that process. Because once a company realizes terminology drift between subsidiary reports is a recurring, expensive problem, the next question is always "can we automate part of this?" The answer is yes, partially, and the engineering is more interesting than it sounds.&lt;/p&gt;

&lt;h2&gt;
  
  
  The actual problem is a vocabulary consistency problem
&lt;/h2&gt;

&lt;p&gt;A finance team producing reports in Portuguese, French and Brazilian Portuguese will end up with three slightly different terms for the same line item. "Provisions pour risques," "provisões para riscos e encargos," "provisões para contingências." None of these are wrong. All of them break automated consolidation if you're trying to map line items programmatically, and all of them slow down human reviewers trying to eyeball whether two reports agree.&lt;/p&gt;

&lt;p&gt;This is a terminology management problem before it's a translation problem. If you've worked with localization tooling you'll recognize the shape immediately: it's the same class of issue as keeping UI strings consistent across a product with multiple translators.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a glossary as structured data, not a shared doc
&lt;/h2&gt;

&lt;p&gt;The naive version of this is a shared Google Sheet with source term, target language, approved translation. That works for a while. It breaks down once you have multiple standards (IFRS vs local GAAP), multiple entity names, and glossary terms that need versioning across closing cycles.&lt;/p&gt;

&lt;p&gt;A better starting point is treating the glossary as structured data you can validate against:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"IFRS-DTA-001"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"concept"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"deferred_tax_assets"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"standard"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"IFRS"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"translations"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"pt-PT"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ativos por impostos diferidos"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"pt-BR"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ativos fiscais diferidos"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"fr-FR"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"actifs d'impôt différé"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"en-GB"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"deferred tax assets"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"locked"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"notes"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"No synonyms permitted. Do not mix with local GAAP equivalent term."&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once terminology lives like this, it becomes something you can lint against. A few practical uses:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run a script over translated reports (even just the text layer of a PDF or the XBRL tags) and flag any instance where a locked term's expected translation doesn't appear.&lt;/li&gt;
&lt;li&gt;Feed the glossary into a CAT tool's termbase (SDL Trados, memoQ, Phrase all support structured term import) so translators get it as an in-context suggestion, not a separate PDF they have to cross-reference.&lt;/li&gt;
&lt;li&gt;Version it per closing cycle so you can diff Q1 vs Q3 glossary changes and catch terminology drift before it ships.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A lightweight consistency checker
&lt;/h2&gt;

&lt;p&gt;You don't need a full NLP pipeline to catch a lot of these issues. A simple term-matching script against extracted text gets you most of the value:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_consistency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"locked"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="n"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"translations"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="c1"&gt;# crude check: if the concept's source term pattern appears&lt;/span&gt;
        &lt;span class="c1"&gt;# but the approved translation doesn't&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"concept"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"_"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;" "&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="s2"&gt;"concept"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;entry&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"concept"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"expected"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;expected&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                &lt;span class="s2"&gt;"locale"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;locale&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;

&lt;span class="n"&gt;glossary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"glossary.json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;report_text&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"subsidiary_report_fr.txt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;check_consistency&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;report_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"fr-FR"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"Possible term mismatch: expected '{i['expected']}' for {i['concept']}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will never replace a human reviewer, especially for anything that goes to auditors or regulators. But it's a fast first pass that catches the obvious drift before a document even reaches review, and it costs nothing to run on every draft.&lt;/p&gt;

&lt;h2&gt;
  
  
  Translation memory is just a cache, treat it like one
&lt;/h2&gt;

&lt;p&gt;Translation memory (TM) tools store previously translated segments so they can be reused. If your company switches translation vendors every closing cycle, you're invalidating that cache every time, which is the expensive part people underestimate. The source article makes this point from the process side; from a tooling side it's worth stating plainly: a TM with no continuity is functionally equivalent to a cache with no retention.&lt;/p&gt;

&lt;p&gt;If you have any influence over vendor selection or tooling, push for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;TM export in a standard format (TMX) so it's portable even if the vendor changes.&lt;/li&gt;
&lt;li&gt;A shared termbase format you control, not one locked inside a vendor's proprietary platform.&lt;/li&gt;
&lt;li&gt;API access if the provider has one, so glossary updates and document submission can be scripted rather than done through a web portal every quarter.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Where this fits in a reporting pipeline
&lt;/h2&gt;

&lt;p&gt;If your org already has some kind of XBRL tagging or structured reporting pipeline for consolidation, the glossary validation step slots in naturally as a pre-submission check:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Subsidiary finance team finalizes local-language report.&lt;/li&gt;
&lt;li&gt;Automated terminology check runs against the shared glossary, flags mismatches.&lt;/li&gt;
&lt;li&gt;Flagged items go back to the translator/reviewer before the document enters formal review.&lt;/li&gt;
&lt;li&gt;Document goes through the appropriate review tier (internal use vs audited/published, as the source article describes).&lt;/li&gt;
&lt;li&gt;Approved terms and any new concepts get added back into the glossary for the next cycle.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Step 5 is the one people skip, and it's the one that actually compounds value over multiple closing cycles.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;None of this replaces professional financial translation, especially for anything that ends up in front of auditors or regulators. But a lot of the pain in multinational closing cycles comes from the same terminology drifting silently across documents and languages, and that part is genuinely tractable with fairly simple tooling. If you're the engineer who gets asked to "just make the reports match," start with a structured glossary before you start thinking about anything fancier.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>automation</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Building a Terminology Pipeline for PED Compliance Docs (Without Losing Your Mind)</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Tue, 24 Nov 2026 12:16:30 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-ped-compliance-docs-without-losing-your-mind-ab6</link>
      <guid>https://dev.to/diogoheleno/building-a-terminology-pipeline-for-ped-compliance-docs-without-losing-your-mind-ab6</guid>
      <description>&lt;p&gt;If you've ever worked on tooling for a manufacturer that ships pressure equipment into the EU, you know the compliance paperwork is its own engineering problem. The &lt;a href="https://www.m21global.com/en/blog/ped-directive-translation-pressure-equipment/" rel="noopener noreferrer"&gt;PED Directive (2014/68/EU)&lt;/a&gt; requires instructions for use, declarations of conformity and supporting technical docs to be translated into the official language of every destination market. Get a term wrong and a notified body can reject the whole package.&lt;/p&gt;

&lt;p&gt;That article covers the regulatory side well: what PED requires, which documents need translation, and how to pick a service tier based on legal weight. What it doesn't cover is the part a lot of us end up owning by default: the actual content pipeline that keeps terminology consistent across dozens of documents, languages and product revisions.&lt;/p&gt;

&lt;p&gt;This is the engineering side of that problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this becomes a software problem fast
&lt;/h2&gt;

&lt;p&gt;A single pressure vessel SKU can generate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An EU declaration of conformity&lt;/li&gt;
&lt;li&gt;Instructions for use (assembly, operation, maintenance, safety)&lt;/li&gt;
&lt;li&gt;A technical data sheet&lt;/li&gt;
&lt;li&gt;Design calculations and test reports&lt;/li&gt;
&lt;li&gt;Multiple language variants of all the above&lt;/li&gt;
&lt;li&gt;Revisions every time a harmonised standard updates (EN 13445, EN 12952, EN 12953...)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Multiply that by every EU member state you sell into and you have a content management problem that looks a lot like software localization, except the stakes are a rejected CE marking instead of a broken UI string.&lt;/p&gt;

&lt;p&gt;If you're still managing this in shared Word docs and email threads, terminology drift is inevitable. "Permissible Maximum Pressure" becomes "maximum operating pressure" in one doc and stays correct in another, and now you've got an inconsistency a notified body reviewer will flag.&lt;/p&gt;

&lt;h2&gt;
  
  
  Treat your glossary like a schema, not a spreadsheet
&lt;/h2&gt;

&lt;p&gt;The fix that scales is the same one we use for i18n in software: a single source of truth for terms, enforced programmatically.&lt;/p&gt;

&lt;p&gt;A minimal setup:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"PS_MAX_PRESSURE"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Maximum allowable pressure"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"de"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Maximal zulässiger Druck"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"pt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Pressão máxima admissível"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"standard_ref"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"EN 13445-3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"do_not_confuse_with"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"operating pressure"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"status"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"approved"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Store this as structured data (JSON, a terminology database, or a TBX file if you want an actual industry standard format), not a Word table. TBX (TermBase eXchange) is the ISO standard for exactly this and most CAT tools (memoQ, Trados, Phrase) import/export it natively.&lt;/p&gt;

&lt;p&gt;Once terms are structured, you can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run automated QA checks against translated documents (does "Notified Body" appear with consistent capitalization everywhere?)&lt;/li&gt;
&lt;li&gt;Diff terminology between document versions when a standard updates&lt;/li&gt;
&lt;li&gt;Feed the glossary into whatever translation tooling or LLM-assisted workflow you're using, so it's not relying on a translator's memory&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  A practical QA script
&lt;/h2&gt;

&lt;p&gt;If your docs live in a structured format (XML, Markdown, DITA), a basic terminology linter is cheap to build. Here's a stripped-down example using Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;load_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_terminology&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;approved&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;lang&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;forbidden&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"do_not_confuse_with"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;approved&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;bad_term&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;forbidden&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;search&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;rf&lt;/span&gt;&lt;span class="s2"&gt;"\b{re.escape(bad_term)}\b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;doc_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;IGNORECASE&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
                &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                    &lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;term&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"term_id"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"found"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;bad_term&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                    &lt;span class="s2"&gt;"expected"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;approved&lt;/span&gt;
                &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;

&lt;span class="n"&gt;glossary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;load_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ped_glossary.json"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;doc&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"instructions_pt.md"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;issues&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;check_terminology&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"pt"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;issue&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;issues&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;f&lt;/span&gt;&lt;span class="s2"&gt;"[WARN] Found '{issue['found']}', expected '{issue['expected']}' (term: {issue['term_id']})"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This won't replace a human reviewer for a legal document like a declaration of conformity, but it catches the dumb, repeatable mistakes before a document ever reaches a translator or a notified body. Run it in CI if your docs are version-controlled, which they should be.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version control for regulatory docs is not optional
&lt;/h2&gt;

&lt;p&gt;Treat your PED documentation set like you'd treat a codebase:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Git repo per product line, with docs in Markdown or XML&lt;/li&gt;
&lt;li&gt;Branches per language, or a translation memory system that tracks source/target pairs&lt;/li&gt;
&lt;li&gt;Tags for each certification cycle, so you can prove exactly what version of the instructions was submitted to the notified body&lt;/li&gt;
&lt;li&gt;CI pipeline that runs your terminology linter, link checker, and a diff report on every PR&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This also solves a problem the source article mentions almost in passing: documentation needs to stay in sync when harmonised standards update. If EN 13445 gets revised, you want a single place to search for every document referencing the old clause number, not a manual grep through shared drives.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where machine translation actually fits
&lt;/h2&gt;

&lt;p&gt;The source article breaks down service tiers by document risk (Estratégica/Standard/IAH+ in their case), and that maps cleanly onto an automation decision:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;High-stakes legal documents&lt;/strong&gt; (declaration of conformity): full human translation + review, don't automate past the glossary-check stage&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;High-volume operational docs&lt;/strong&gt; (instructions for use, multiple product variants): MT + human post-editing is viable, &lt;em&gt;if&lt;/em&gt; the MT engine is fed your approved terminology as a custom glossary or fine-tuning data&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Internal/reference material&lt;/strong&gt;: MT with spot-checks on flagged segments is reasonable&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're integrating MT APIs (DeepL, Google Cloud Translation, Azure Translator), all three support custom glossaries you can feed from the same structured terminology source. Don't let your glossary live in two places, one for humans and one for the API. Sync them from a single source.&lt;/p&gt;

&lt;h2&gt;
  
  
  The takeaway
&lt;/h2&gt;

&lt;p&gt;Regulatory translation for PED compliance is a legal and linguistic problem, and that side is well covered by specialized translation providers. But the terminology consistency, version control and QA automation around it is an engineering problem, and it's one most teams solve with spreadsheets and hope.&lt;/p&gt;

&lt;p&gt;A structured glossary, a linter in CI, and version-controlled docs will save you more rejected certifications than any single translator's expertise, good as that expertise might be.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>devops</category>
      <category>productivity</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Automating i18n QA: Catching Truncation, Pluralization, and RTL Bugs Before They Ship</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Mon, 23 Nov 2026 10:11:04 +0000</pubDate>
      <link>https://dev.to/diogoheleno/automating-i18n-qa-catching-truncation-pluralization-and-rtl-bugs-before-they-ship-22ek</link>
      <guid>https://dev.to/diogoheleno/automating-i18n-qa-catching-truncation-pluralization-and-rtl-bugs-before-they-ship-22ek</guid>
      <description>&lt;p&gt;Translation vendors hand you back a pile of translated strings. Your CI pipeline doesn't know or care whether those strings break your layout, mangle your plural logic, or silently drop a variable. That gap is exactly where most localisation bugs slip into production.&lt;/p&gt;

&lt;p&gt;There's a good breakdown of the linguistic vs. functional split in localisation testing over on &lt;a href="https://www.m21global.com/en/blog/testing-localisation-before-launch/" rel="noopener noreferrer"&gt;M21Global's blog&lt;/a&gt;. It covers what a native-speaking reviewer should check for tone, terminology and cultural fit. This article picks up the other half: what you, as a developer, can actually automate and test in CI before a human ever opens the app.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bugs that only show up after translation
&lt;/h2&gt;

&lt;p&gt;If you've shipped an i18n'd product, you've seen at least one of these:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A button that says "Submit" in English and overflows its container when it becomes "Soumettre votre candidature" in French&lt;/li&gt;
&lt;li&gt;A price formatted as &lt;code&gt;$1,200.50&lt;/code&gt; in your test locale but rendered as &lt;code&gt;1.200,50 $&lt;/code&gt; somewhere else, breaking a regex that assumed US formatting&lt;/li&gt;
&lt;li&gt;A sentence like "You have {count} new messages" that reads fine in English but is grammatically wrong in Arabic or Polish because they have more plural categories than "one" and "other"&lt;/li&gt;
&lt;li&gt;A &lt;code&gt;%s&lt;/code&gt; placeholder that got translated along with the surrounding text and now throws at runtime&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of these are caught by a linguist reading a spreadsheet of exported strings. They only appear once the string is rendered in a real UI, in a real locale, with real data.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pseudolocalization: catch layout bugs before translations exist
&lt;/h2&gt;

&lt;p&gt;You don't need real translations to catch truncation and layout bugs. Pseudolocalization generates fake "translated" strings that simulate the characteristics of real languages: longer text, accented characters, bidi markers.&lt;/p&gt;

&lt;p&gt;A basic pseudolocalizer takes &lt;code&gt;"Submit"&lt;/code&gt; and turns it into something like &lt;code&gt;"[!!! Šúƀmíţ Șúbmít !!!]"&lt;/code&gt; — padded 30-40% longer, with accented characters, wrapped in brackets so truncation is obvious.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;pseudoLocalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;accentMap&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'á'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'é'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'í'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ó'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;u&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'ú'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="no"&gt;A&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Á'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;E&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'É'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;I&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Í'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;O&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Ó'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;U&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'Ú'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;accented&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;replace&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;aeiouAEIOU&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;g&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;accentMap&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;padding&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'~'&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;repeat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;ceil&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;0.3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sb"&gt;`[${accented}${padding}]`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nf"&gt;pseudoLocalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Submit your application"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// "[Śúƀmít yóúr áppĺícátíón~~~~~~~~]"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run your UI tests (Playwright, Cypress, whatever you use) against the pseudolocalized build. If something truncates or overflows, you've found a layout bug without waiting for a translation vendor to deliver anything.&lt;/p&gt;

&lt;p&gt;Tools that do this for you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;i18next&lt;/strong&gt; has pseudolocalization plugins for React/Vue projects&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Android&lt;/strong&gt; supports it natively via &lt;code&gt;adb shell setprop persist.sys.locale en-XA&lt;/code&gt; (accented) and &lt;code&gt;en-XB&lt;/code&gt; (RTL simulation)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lingui&lt;/strong&gt; and &lt;strong&gt;Format.js&lt;/strong&gt; both support pseudolocale generation in their CLI tooling&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Automating pluralization checks
&lt;/h2&gt;

&lt;p&gt;CLDR (Unicode Common Locale Data Repository) defines plural categories per language: &lt;code&gt;zero&lt;/code&gt;, &lt;code&gt;one&lt;/code&gt;, &lt;code&gt;two&lt;/code&gt;, &lt;code&gt;few&lt;/code&gt;, &lt;code&gt;many&lt;/code&gt;, &lt;code&gt;other&lt;/code&gt;. English only uses &lt;code&gt;one&lt;/code&gt; and &lt;code&gt;other&lt;/code&gt;. Arabic uses all six. Polish uses four.&lt;/p&gt;

&lt;p&gt;If your i18n library supports ICU MessageFormat, use it instead of hand-rolled conditionals:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;messages&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;en&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'{count, plural, one {# message} other {# messages}}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;pl&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'{count, plural, one {# wiadomość} few {# wiadomości} many {# wiadomości} other {# wiadomości}}'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;ar&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'{count, plural, zero {} one {رسالة واحدة} two {رسالتان} few {# رسائل} many {# رسالة} other {# رسالة}}'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then write a test that iterates every supported locale and every plural category CLDR defines for it, asserting that a translation exists for each category your language requires:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;getPluralCategories&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="s1"&gt;'@formatjs/intl-pluralrules'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;checkPluralCoverage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;messageKeys&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;translations&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;categories&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;getPluralCategories&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;missing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;messageKeys&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;cat&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="n"&gt;categories&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;translations&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;locale&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;cat&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="n"&gt;missing&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sb"&gt;`${locale}:${key}:${cat}`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
      &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;missing&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run this in CI against every string file. A missing plural category is a release blocker, not a nice-to-have fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking regional formats automatically
&lt;/h2&gt;

&lt;p&gt;Don't hand-roll date, currency or number formatting. Use &lt;code&gt;Intl&lt;/code&gt; (built into every modern JS runtime) and write snapshot tests per locale:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;formatter&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NumberFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'de-DE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'currency'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;currency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'EUR'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;formatter&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1200.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// "1.200,50 €"&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;formatterPT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Intl&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;NumberFormat&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'pt-PT'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="n"&gt;style&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'currency'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;currency&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'EUR'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;formatterPT&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;1200.5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// "1200,50 €"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Snapshot these outputs for every locale you support. If a build changes the output unexpectedly, your snapshot test fails and you catch a formatting regression before it ships, rather than after a user in Lisbon reports a broken price.&lt;/p&gt;

&lt;h2&gt;
  
  
  A practical CI pipeline for localisation QA
&lt;/h2&gt;

&lt;p&gt;Here's a rough pipeline that catches most of what functional localisation testing is looking for, before a human tester gets involved:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Lint string files&lt;/strong&gt; for unused placeholders, mismatched variable counts between source and target, and missing plural categories&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build a pseudolocalized version&lt;/strong&gt; of the app and run your existing UI test suite against it, specifically checking for overflow/truncation (&lt;code&gt;element.scrollWidth &amp;gt; element.clientWidth&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Snapshot test &lt;code&gt;Intl&lt;/code&gt; formatting&lt;/strong&gt; output for dates, currency, and numbers across every supported locale&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Run RTL smoke tests&lt;/strong&gt; using &lt;code&gt;en-XB&lt;/code&gt; or an actual Arabic/Hebrew build, checking that layout direction flips and nothing is visually mirrored incorrectly (icons, especially)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Visual regression testing&lt;/strong&gt; per locale using Percy, Chromatic or Playwright's screenshot comparison, flagging anything that shifted more than a threshold&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This doesn't replace the native-speaker linguistic review covered in the M21Global piece. It replaces the manual, error-prone functional pass that usually happens once, right before launch, under time pressure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where this fits with translation vendors
&lt;/h2&gt;

&lt;p&gt;If you're working with a localisation vendor, ask for machine-readable deliverables: ICU MessageFormat strings, not flat key-value pairs with pluralization baked into the English assumption. Ask whether their QA process covers the same CLDR plural categories your codebase needs to support. The earlier this is a shared contract between your codebase and the vendor's output, the less you'll be debugging a broken Polish plural form three days before launch.&lt;/p&gt;

&lt;p&gt;Catching these bugs in CI is cheap. Catching them during a native-speaker review, or worse, after a user reports it, is not.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>testing</category>
      <category>webdev</category>
      <category>devops</category>
    </item>
    <item>
      <title>Building a Content Pipeline for Multilingual HR Documents (Without Losing Legal Accuracy)</title>
      <dc:creator>Diogo Heleno</dc:creator>
      <pubDate>Mon, 23 Nov 2026 08:48:20 +0000</pubDate>
      <link>https://dev.to/diogoheleno/building-a-content-pipeline-for-multilingual-hr-documents-without-losing-legal-accuracy-1gkd</link>
      <guid>https://dev.to/diogoheleno/building-a-content-pipeline-for-multilingual-hr-documents-without-losing-legal-accuracy-1gkd</guid>
      <description>&lt;p&gt;If your company hires across borders, you've probably run into this: someone in HR exports an offer letter template, pastes it into a translation tool, swaps a few variables, and ships it. It works fine until a candidate in Brazil asks about a clause that doesn't legally mean what the English version implied, or a contract in Angola gets rejected because it references the wrong labour code entirely.&lt;/p&gt;

&lt;p&gt;This isn't really a translation problem. It's a pipeline and tooling problem. A source article from M21Global on &lt;a href="https://www.m21global.com/en/blog/translate-job-offers-hiring-documents-abroad/" rel="noopener noreferrer"&gt;translating job offers and hiring documents abroad&lt;/a&gt; covers the legal and localisation side well: why contracts need precision while job adverts need adaptation, and what changes when you hire in Angola, Brazil, or Spain. This article picks up where that one leaves off: how do you actually build a system that handles this without manual chaos every time you open a new market?&lt;/p&gt;

&lt;h2&gt;
  
  
  Why a single translation workflow doesn't work
&lt;/h2&gt;

&lt;p&gt;HR documents aren't homogeneous content. They fall into at least three categories, and each needs a different pipeline:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Marketing-register content&lt;/strong&gt;: job adverts, employer branding pages, FAQs. Tolerant of adaptation, low legal risk.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Structured but semi-legal content&lt;/strong&gt;: offer letters, onboarding forms, benefits summaries. Moderate risk, often templated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Legal content&lt;/strong&gt;: employment contracts, non-competes, HR policies used in disciplinary processes. Zero tolerance for ambiguity.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're building internal tooling for this, don't route everything through the same API call with the same temperature setting and the same "please translate this" prompt. You'll get fluent text that's wrong in exactly the clauses that matter most.&lt;/p&gt;

&lt;h2&gt;
  
  
  Structuring documents for translation, not just writing them
&lt;/h2&gt;

&lt;p&gt;The biggest win for engineering teams here isn't a better translation model. It's structuring the source documents so translation (human or machine) has less room to drift.&lt;/p&gt;

&lt;p&gt;Practical steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Separate variable content from legal boilerplate.&lt;/strong&gt; Store contract clauses (notice period, non-compete scope, termination terms) as discrete, versioned blocks, not embedded paragraphs in a Word doc. A clause library means your legal team approves wording once, and every translation references that approved source, not a copy-pasted variant.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;"clause_id"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"non_compete_v3"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"jurisdiction"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"PT"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"AO"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"BR"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"locale_overrides"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;"AO"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"clause_non_compete_ao_v1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nl"&gt;"BR"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"clause_non_compete_br_v2"&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"source_text"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"approved_by"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"legal-team"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="nl"&gt;"last_reviewed"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"2024-11-01"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Tag content by risk tier at the data model level.&lt;/strong&gt; A &lt;code&gt;risk_level: legal | hr_policy | marketing&lt;/code&gt; field on every document or block lets your pipeline route automatically: marketing content goes through machine translation with light review, legal content is flagged for mandatory human review by two linguists before it's marked &lt;code&gt;approved&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Never let machine translation touch jurisdiction-specific terminology without a glossary.&lt;/strong&gt; This is the part teams skip. If your contract template says "holiday entitlement" and you're localising for Brazil, you need a controlled glossary that maps to CLT-specific terms (30 dias corridos de férias), not whatever a generic MT model guesses.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  A basic routing pipeline
&lt;/h2&gt;

&lt;p&gt;Here's a simplified version of what this looks like as an actual workflow, not just a philosophy:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;route_document&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;risk_level&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"legal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;send_to_human_pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;reviewers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;get_jurisdiction_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;require_sign_off&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"legal_team"&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;risk_level&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"hr_policy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;send_to_human_pipeline&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;reviewers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="n"&gt;glossary&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;get_jurisdiction_glossary&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;draft&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;machine_translate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;source_text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;doc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;target_locale&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;send_for_light_review&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;draft&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The point isn't the code itself, it's the principle: risk tier determines the number of human touchpoints, and glossary enforcement is mandatory regardless of tier once you're dealing with jurisdiction-specific terms like labour law references.&lt;/p&gt;

&lt;h2&gt;
  
  
  Glossaries and translation memory are infrastructure, not nice-to-haves
&lt;/h2&gt;

&lt;p&gt;If you're integrating with a CAT tool or a translation API (DeepL API, Google Cloud Translation with glossary support, or a vendor's own platform), treat your glossary as versioned infrastructure:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Store it in the same repo as your contract templates, not in a spreadsheet someone edits manually.&lt;/li&gt;
&lt;li&gt;Version it per jurisdiction. "Holiday" in a UK context and "férias" in a Brazilian CLT context are not interchangeable, and a shared glossary without locale scoping will silently produce wrong matches.&lt;/li&gt;
&lt;li&gt;Run automated checks that flag any legal document translated without a glossary match on key terms (notice period, termination, non-compete, probation).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Most translation APIs support glossary injection directly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;deepl_client&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;translate_text&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;contract_clause&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;target_lang&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"PT-BR"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;glossary_id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;glossaries&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"BR_labour_law"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is a small code change but it's the difference between a draft that a human reviewer can approve quickly and one that needs a full rewrite.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where human review is non-negotiable
&lt;/h2&gt;

&lt;p&gt;No pipeline should auto-approve legal content. The M21Global article makes the point that contract clauses have direct legal weight in disputes, and that's true regardless of how good your MT model is. The workflow that actually holds up involves two independent linguists, translator and reviewer, plus a QA pass, which is a structure worth replicating in your own vendor selection criteria even if you're not using M21Global specifically.&lt;/p&gt;

&lt;p&gt;What you can automate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Routing documents to the correct pipeline based on risk tier&lt;/li&gt;
&lt;li&gt;Glossary enforcement and terminology consistency checks&lt;/li&gt;
&lt;li&gt;Version control and diffing between source and target to catch untranslated segments or placeholder leaks (&lt;code&gt;{{employee_name}}&lt;/code&gt; left untranslated, for example)&lt;/li&gt;
&lt;li&gt;Flagging documents that reference jurisdiction-specific law terms without a corresponding locale override&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;What you shouldn't automate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Final sign-off on any document with legal weight&lt;/li&gt;
&lt;li&gt;Interpretation of ambiguous clauses across legal systems (a non-compete enforceable in Portugal may not be enforceable in Angola under the Lei Geral do Trabalho)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Takeaway
&lt;/h2&gt;

&lt;p&gt;If you're building or maintaining the systems behind an international hiring process, the technical lever you have isn't a better translation prompt. It's better document structure: separating legal from marketing content, enforcing jurisdiction-aware glossaries, and routing by risk tier so human review time gets spent where it actually matters. Get that right and the translation step becomes a lot less risky, whichever vendor or model sits behind it.&lt;/p&gt;

</description>
      <category>i18n</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>api</category>
    </item>
  </channel>
</rss>
