Skip to main content
hadih26673991
Inspiring
September 13, 2019
Question

how to import text insets via variables?

  • September 13, 2019
  • 4 replies
  • 2082 views

Hi,

I would like to extend my user manual template using text insets and variables for single sourcing into different languages. In other words, what I am trying to explain is a book with n chapters where each chapter is available in few different languages. I would like then to create a book whose n chapters (chapter_1 to chapter_n) are blank templates. Then using text insets, I can import the corresponding texts into each individual chapter. However, I would like to have only one book for all the different languages that I have. To achieve this, I intend to refer to the corresponding fm files using a "lang" variable. For instance, into chapter_1, I would like to import: chapter_1_eng.fm and into chapter_2: chapter_2_eng.fm etc. Then for German that would be chapter_1_ger.fm for chapter_1 and chapter_2_ger.fm for chapter_2. This way, I can set the value of the lang variable to the corresponding language after opeining the book and hopefully get the correct chapter contents. So, all I would need to know is how to combine the lang variable, with the inserted filenames.

 

Sorry for the long story.

 

Cheers,

Hadi

This topic has been closed for replies.

4 replies

Matt-Tech Comm Tools
Community Expert
Community Expert
September 14, 2019

The things you are doing are pointing you in the general direction of structure. In fact, the lang would be an attribute with a value that could be used to display the appropriate text within your system.

 

Are you working with a localization vendor, and are you using a CCMS? If not, evaluate how much your current system is costing you and consider moving to either or both.

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
hadih26673991
Inspiring
September 16, 2019
Hi Matt, I am not familiar with neither localization vendor nor CCMS. I am using structured FrameMaker using an EDD.
Matt-Tech Comm Tools
Community Expert
Community Expert
September 16, 2019

Hi Hadi, it's good to hear that you're using structure with an EDD. Can you share a screenshot of your structure window with all attributes displayed?

 

Also, your challenge isn't exactly the same as your subject line for the post. You might consider creating one or more new threads, probably in the Structured FrameMaker forum.

-Matt Sullivan, FrameMaker Course Creator, Author, Trainer, Consultant
Jeff_Coatsworth
Community Expert
Community Expert
September 13, 2019

Ok, but as far as I know, there's no magic way to just open a product's book file and see only that language's chapters. You'd still have to either use the Exclude function (language by language) or some conditional show/hide settings to screen out all the languages you don't want to publish.

LinSims
Community Expert
Community Expert
September 13, 2019

If I understand you correctly, what you are saying is that you want to create a book file with multiple chapter files that are empty of content. You want to set the value of a variable to a specific language, and then you want FrameMaker to automatically import files as text insets based on the variable's contents across multiple files in the book.

 

You cannot control which files are imported as insets by use of a variable.

 

What you might be able to do instead is set up conditions that control which text inset is visible. This would result in a file that has all of the languages imported as separate insets, with each inset conditionaled to its own language. Then you can hide all the languages not wanted by hiding the conditions and the only inset visible would be the language you want to see.

 

I seem to recall that there can be some oddities that happen with text insets and conditions, and I haven't worked with text insets so I can't help much on that aspect.

 

If you're determined to use variables to control this, it's possible you could do this using a script, and there are people on the boards who write scripts for a living that you can talk to about this. 

hadih26673991
Inspiring
September 13, 2019
Yep, you understood me correctly and I like your solution of adding all the languages using text insets and show only one language using a condition. Would this be done using the Conditional Tags pod?
LinSims
Community Expert
Community Expert
September 13, 2019
Yes, it would. Set up a condition for each language.
Jeff_Coatsworth
Community Expert
Community Expert
September 13, 2019

Why one book with all languages? Wouldn't it be easier to manage if you had separate books for each language?

hadih26673991
Inspiring
September 13, 2019

Hi Jeff, That would be more elegant and easier to manage if this could be done. As we have many products and for each product many languages. We already decided to create a separate book for each product but not for every language.