Copy link to clipboard
Copied
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.
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
...Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Thank you so much!
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi Jang,
maybe I missunderstood something, but xml:lang works fine for me in ContextRules:
<TextFormatRules>
<ContextRule>
<If>
<Specification>[xml:lang = "en-US"]</Specification>
<ParagraphFormatting>
<PropertiesFont>
<Language>
<USEnglish/>
</Language>
</PropertiesFont>
</ParagraphFormatting>
</If>
<ElseIf>
<Specification>[xml:lang = "de-DE"]</Specification>
<ParagraphFormatting>
<PropertiesFont>
<Language>
<DeutschNeu/>
</Language>
</PropertiesFont>
</ParagraphFormatting>
</ElseIf>
</ContextRule>
</TextFormatRules>
This way, I can set the xml:lang attribute to en-US or de-DE for an element and then FM changes the paragraf language accordingly. Changing xml:lang from string to choice and adding language codes also makes it nicely selectable for the user in the attibute panel.
Kind regards,
Stefan
Copy link to clipboard
Copied
Hello Stefan,
You are of course right. I was confused with the definition of variables as well as prefixes and suffixes that use attribute values. These definitions use a colon to point to an attribute on an ancestor, which means that a colon as part of an attribute name does not work at all. So if you have any variables, prefixes and/or suffixes you would like to make language-dependent, you should still use my workaround for the @xml:lang - which effectively renames the attribute to @LANG without hurting the DITA validation rules.
Now that we are discussing language settings via the @xml:lang, I do need to add that the language settings are inherited in all elements EXCEPT table cells. It seems that every single entry in a table has to explicitly set the language to make it use the proper dictionary and hyphenation rules. I tried setting the attribute on the <tgroup> but that does not work either. It is a long-overlooked omission in the application of EDD text format rules.
Kind regards
Jang
Copy link to clipboard
Copied
Hi Jang,
I remember now that once I went down this road to use the xml:lang attribute but got stuck with the table cells as the language was not set for those elements according to the language tag as you also mentioned. I guess at that point I gave up on that.
Copy link to clipboard
Copied
It would be very simple to overcome this issue with a simple XSL transform added to the DITA application, which copies xml:lang from the nearest ancestor to all entry elements. I am working on a Smart DITA client for FrameMaker and will certainly incorporate this feature. It will take some time before I have that done, so if you need this XSL let me know.
Copy link to clipboard
Copied
Hi
I'm a FrameMaker newbie (FM2020 flavour) - migrating over from using InDesign.
This is the closest thread I've found that addresses my question but it still seems a bit of a sledge hammer to crack a nut.
How do you set the default language simply?
If you go to preferences, under Spelling you have a list of dictionaries but there is no way to set a default one to use. Under paragraph designer the language is defaulted to English (US).
I want/need to use English (UK) as the default language.
It's annoying enough to have to change the language for each font style but the setting doesn't persist even when using the Update Style and Apply buttons - everytime I start a new document or reopen an existing one I have to go back and reset the font language (even if I haven't closed FM).
There's got to be an easy way to set the chosen language globally and have it stick until you want/need to change it.
I'm hoping its a simple fix but I've read the manual and searched on Google but I can't find the answer.
Fingers crossed someone on the forum knows.
Copy link to clipboard
Copied
If you are working with classic FrameMaker documents, you can follow the step-by-step guide that StudioSM has given earlier in this thread. I have slightly modified it to be more general and also cover other changes that you want to make to all styles:
If you are working with XML, do the same on the template file. How to access that and create a new templace, I have described just a few minutes ago in a separate thread (here).
Copy link to clipboard
Copied
Hi
I spotted those instruction before i posted - they work to a point but didn't solve the problem with the language defaulting back to English (US) when creating a new document or re-opening an existing one.
However, I've just tried the template method (on the other thread) and this worked 🙂
Thanks.
Copy link to clipboard
Copied
Great to hear that. In that case you might want to mark the answer in the other thread as "Correct answer" if you like. Thanks 🙏
Copy link to clipboard
Copied
StudioSm's answer worked perfectly for me. Just follow the steps.