I am attempting a slightly obscure hack using a couple of my file-based MultiTerm termbases in MultiTerm 2021 to help with accessibility of abbreviations and reading language of webpages for screenreaders. The idea was admittedly one that I scribbled down on a Post-it note on the way to pick my children up from Kindergarten. I got the first use case to work nicely, and need a bit of a hint about how to handle the second one!
1) Abbreviations
I have a lot of abbreviations that are used in web pages, where for accessibility reasons the full term needs to be included.
Basically this is done in the backend of WordPress using the format [abbr title="TERM GOES IN HERE"]ABBREVIATION[/abbr]
I've managed to get the output I want by using an export definition as follows:
and
And it spits out the definitions (sorted alphabetically by the German term) into a text file like so:
[abbr title="Aktiengesellschaft"]AG[/abbr]
[abbr title="Aktiengesetz"]AktG[/abbr]
[abbr title="Allgemeine Bedingungen für das Bauspargeschäft"]ABB[/abbr]
Which is perfect for the needs of the colleague who copies and pastes them into the code view in the backend in WordPress.
2) Screenreader Language (and this is where my actual question is!)
To handle the screenreader issue, in this (fictitious) example I have various language company names in an otherwise German text (taken from a termbase using the official company names as entered in an official company register - these names are saved in a Termbase and otherwise used for a QA check...).
What I want to do is to export entries like [lang title="fr"]Banque GPT[/lang]. Similarly to with the abbreviation idea, "Banque GPT" is in the "Terminus" field and the "fr" is in a descriptive field "Lang" below the term.
The problem I have is that I don't see how I can export the field contents only so that the entry for lang is outputted *before* the term. Is there an easy way to do this when doing the export definition.
At the moment I have only managed to create output like:
[lang title="Banque GPT"]fr[/lang]
[lang title="Banca ABC"]it[/lang]
[lang title="DEF Bank"]en[/lang]
I realise that there might be easier ways, like another kind of export e.g. term, lang and then write a little bit of Python to come up with what I need, but I have other potential use cases so would like to do this from MultiTerm if possible.
Many thanks in advance, and sorry if anyone is wondering why on earth I want to do this!
Michael Bailey
Generated Image Alt-Text
[edited by: Trados AI at 2:16 PM (GMT 0) on 5 Mar 2024]