Skip to main content
Inspiring
March 6, 2021
Question

Use a variable as a definition within another variable

  • March 6, 2021
  • 4 replies
  • 217 views

Is it possible to use a variable within a variable? What I would like to do is to be able to make some translations for specific words and reuse them. For example,  I want to use a publication date variable on a Master page. But if I want to insert the month as April in a document, I'd like to be able to choose a French April variable (thus not having to remember the translation or look it up each time) as the definition for the publication date variable.

    This topic has been closed for replies.

    4 replies

    LinSims
    Community Expert
    Community Expert
    March 8, 2021

    What I do is set up what I call a "settings file" that has all the variable definitions and conditions needed for a particular output. 

     

    So in your case, set up a variable for the month and create two settings files, one with the English word and one with the French, then import as needed.

    frameexpert
    Community Expert
    Community Expert
    March 8, 2021

    Variables are easy to work with programmatically, so there may be some clever ways to do this via scripting. If you want to explore this, please contact me off list. If we come up with some ideas, I will post them to the forums so others can benefit. rick at frameexpert dot com

    Community Expert
    March 8, 2021

    No. You cannot insert variables in variables. You have to split your text into distinct variables.

    You might add a feature request in the Adobe Tracker: https://tracker.adobe.com/

     

    When you want French months, then apply French as paragraph language.

    Bob_Niland
    Community Expert
    Community Expert
    March 6, 2021

    default5zqyuolh1bed: Is it possible to use a variable within a variable?

    No. It's often been wished for, however.
    There may be other ways to approach the localization issues, such as Conditional Text, or by having a separate suite of localized stub files containing only the localized Variable definitions to import, or having localized host files that import the Flow A from the master authoring files, etc.

    re: I want to use a publication date variable on a Master page.

    I've always dodged the date localization problem entirely, by using ISO 8601 format.
    Reply originally posted 2021-03-06