Skip to main content
Inspiring
January 14, 2025
Question

Changing generated strings in a structured template

  • January 14, 2025
  • 3 replies
  • 450 views

Greetings,

 

I work in a structured FrameMaker template provided by a Swedish authority for a specific project. They provide their templates as *.mif files and we save them as *.fm and create the documents as needed. Works well. There is no structured application and one isn't needed, as there is no requirement for roundtripping in xml. However, the document needs to be translated and for that reason I need to update a couple of strings when the translations arrive, such as those that go before figure numbers ("Bild") and those that go before warnings ("Varning"). 

 

What is the process in FrameMaker to do this? I've never had a need to do it before, so have only a vague recollection of the EDD route etc. When I export the EDD from the document, I can easly find the strings that come into effect in different languages, (prefix rules with if/else statements) but how do changes in the EDD come into effect in the document? I assumed it had something to do with "Update EDD to Current Version", but this has no effect.

 

Thanks in advance.

 

Mats

    3 replies

    frameexpert
    Community Expert
    Community Expert
    January 14, 2025

    Mats, if you still need help with this, I will be available Thursday morning for a meeting. Please contact me offlist. Thanks.

    Legend
    January 14, 2025

    Hi Mats, you'll need to study the prefix rule to understand what the conditions are, then set the applicable condition. If I had to guess, it is probably some attribute value at the highest-level element. As soon as you set it, the formatting should update automatically. Perhaps you could post some of the "if/else" content so we could try to analyze further.

     

    This all assumes that the EDD is indeed set up to account for the changes that you need. That is, somebody designed the EDD to handle automatic string updates in certain cases for translations.

     

    I actually have no idea what "Update EDD to Current Version" does. I tried to search the help for it but it just processes forever and never returns results.

     

    Hope this helps.

    Russ

    Inspiring
    January 14, 2025

    Hi Russ,

     

    The section in question is:

     

    Prefix rules
    If context is: * < Datamodul[Sprak = "Swe"]
    Prefix: Bild
    Text range.
    Else, if context is: * < Datamodul[Sprak = "Eng"]
    Prefix: Figure
    Text range.
    Else
    Prefix: Bild
    Text range.

     

    So, I can switch between Swedish and English via an attribute, but I need to either add a third language, or "fake" the language by just adding the correct third language translation and enter it under, e.g., Swedish.

     

    I can share the structured template and EDD privately, if needed.

     

    Mats

    Legend
    January 14, 2025

    Hi Mats, it may be easy... at least for the Figure prefix. You can just copy the <ElseIf> element, make the adjustments for the new language, and save the EDD somewhere. Then, you can re-import it back to the original document with File > Import > Element Definitions. After that, you should be able to set the new attribute value and the prefix string will self-adjust as you specified.

     

    Russ

    Jeff_Coatsworth
    Community Expert
    Community Expert
    January 14, 2025

    If there's no requirement for Structure, then why is it being provided as a Structured version? Wouldn't you just have the translation service deal with those figure & warning messages?

    Inspiring
    January 14, 2025

    Hi Jeff,

     

    The authority requires structured authoring, just not roundtripping in xml. So they have created a template that enforces a structure, has an EDD, can be validated etc. - just that you cannot Save as xml/Open as xml.

     

    Regarding the prefixes, it is FrameMaker that generates them so they are not part of the translatable content of the document.

     

    Mats