Skip to main content
hadih26673991
Inspiring
December 2, 2020
해결됨

DITA template language

  • December 2, 2020
  • 2 답변들
  • 1508 조회

Is it possible to change the language of the DITA templates for all the defined styles at once?

The way I do it now is a bit slow: I go to paragraph designer-->Font-->Select a style-->Set language.

This means I have to repeat it for all the styles that I may use. I would rather change the language for the whole template.

이 주제는 답변이 닫혔습니다.
최고의 답변: 4everJang

Although StudioSm gives an answer that works, the better way is of course to use the xml:lang attribute in your DITA files to determine the language settings in the documents. To do this you should look at the attribute in the root element and set your language as ContextRule in the TextFormatRules for that root element. There is a small difficulty to overcome, though. The EDD uses a colon in attribute references to allow pointing at an attribute of a parent element. The DITA xml:lang attribute is using the colon to indicate the XML namespace.

To overcome this issue, you should rename the xml:lang attribute in your DITA template's EDD to lang and add a read-write rule that translates between the xml:lang in the DITA file and lang in your FrameMaker EDD. It is a bit of work, but if you work in an environment where multiple languages are used (which is the majority of tech docs I guess), you will have to use this to allow translations with correct language settings. The only other option you would have is to create one set of templates for each different language - and you would have to quit FM, swap out the templates and restart FM every time you want to work on (or publish) DITA materials in another language.

So, if you are (going to) work in multiple languages, I suggest biting the bullet and doing it the proper way.

2 답변

4everJang
4everJang답변
Legend
December 7, 2020

Although StudioSm gives an answer that works, the better way is of course to use the xml:lang attribute in your DITA files to determine the language settings in the documents. To do this you should look at the attribute in the root element and set your language as ContextRule in the TextFormatRules for that root element. There is a small difficulty to overcome, though. The EDD uses a colon in attribute references to allow pointing at an attribute of a parent element. The DITA xml:lang attribute is using the colon to indicate the XML namespace.

To overcome this issue, you should rename the xml:lang attribute in your DITA template's EDD to lang and add a read-write rule that translates between the xml:lang in the DITA file and lang in your FrameMaker EDD. It is a bit of work, but if you work in an environment where multiple languages are used (which is the majority of tech docs I guess), you will have to use this to allow translations with correct language settings. The only other option you would have is to create one set of templates for each different language - and you would have to quit FM, swap out the templates and restart FM every time you want to work on (or publish) DITA materials in another language.

So, if you are (going to) work in multiple languages, I suggest biting the bullet and doing it the proper way.

hadih26673991
hadih26673991작성자
Inspiring
December 7, 2020

Thanks. Your approach is for sure the more appropriate way for the DITA applications. So I would come back to this solution in a while.

Community Expert
December 2, 2020

Hi hadih26673991,

 

I have only very limited experience with DITA. In unstructured FrameMaker you can just selected all paragraphs (CTRL+A) and then change the language in the Paragraph Designer and click Update Style (or click on the small gear in the lower left corner of the dialog). FrameMaker opens the Global Update Options dialog. There select Default Font Properties Only and All Matching Tags in Selection and click Update. Then FrameMaker updates only the languages.

 

Best regards

 

Winfried

hadih26673991
hadih26673991작성자
Inspiring
December 2, 2020

Hi Winfried,

Thanky for fast reply. I can access the gear for global update options, but it does not give me the option to set the language globally. I still have to select a style.

Community Expert
December 2, 2020

Hi,

 

You have to make your changes (language) in the Paragraph Designer first. Then select the Global Update Options.

The language is part of the font properties.

 

Best regards

 

Winfried