Selecting the Dictionary to be Used in a Document or Section

From NeoWiki

Revision as of 23:50, 24 January 2009 by Sardisson (Talk | contribs)
Jump to: navigation, search
This article is not up to date, or it needs structural or stylistic changes to conform with the rest of this wiki.


Contents

Selecting the Dictionary to be Used in a Document or Section

If you have multiple languages and dictionaries enabled, you can control which dictionary is used in a document (or section thereof) by setting the appropriate preferences.

To set the language of an entire document, select Preferences from the NeoOffice menu, then click the disclosure triangle next to Language settings to expand that section. Next select the Languages item and set the Default languages for documents as desired (either for all new documents, or for the current document only with the appropriate checkbox).

To set the the language of a particular section of text, select the text and choose Character... from the Format menu; set the appropriate language via the appropriate Language box in the Font tab.

Be sure to set the language of the document and/or each section of text appropriately or spell-check will not work.

Note: Make sure that Check in all languages is not checked. To find this preference setting, click on the NeoOffice menu, choose Preferences. In the resulting dialog box, click on the triangle next to Language settings and then select Writing Aids. In the bottom box labeled Options, scroll down to the option Check in all languages. Due to an apparent bug, if this box is checked, even "words" like jksdfhgskzjhgf will be marked as correct.

Automation

Using a Macro

provides this tip for creating a macro to automate the process of changing between languages:

  1. Select some text, then click on the Record Macro button in the top buttonbar. (If there isn't one there, Click on the Tools menu choose Macros and then select Record Macro). A "Stop Recording" floating button will appear.
  2. Under the Format menu, choose Character and then choose the "Font" tab in the panel that comes up. In the Language dropdown, choose your first language, e.g. English (UK), and then click on OK.
  3. Now click on the "Stop Recording" floater – the "Macro" dialog will appear. Enter a meaningful name in the "Macro Name" field, top left, such as LangEnUK, and click on "Save".
  4. Repeat the steps above, but choosing your second language, e.g. German (Germany), and assigning the second macro another name e.g. LangDeDE or whatever.
  5. Now to assign the keys: Under the Tools menu choose Configure... and then click on the "Keyboard" tab. Scroll down to the keystroke you want to assign, e.g. Cmd-shift-G for German (I know -D makes more sense, but that's already being used – though you can overwrite this assignment if you don't need a shortcut for right-to-left typing).
  6. In the "Category" panel bottom left, scroll down to "NeoOffice BASIC", then click on the "+" to open the folder, then do the same with "Standard" within that folder, and click on "Module1" within "Standard". Then in the "Function" panel to its right, click on the macro you named, i.e. LangDeDE, then click on the "Modify" button above right to assign that macro to the keystroke you highlighted earlier.
  7. Repeat the above step with the second keystroke and the second macro, and then click on "OK".
  8. 'tis done! Now when you select text and do cmd-shift-G, that text will be assigned German (Germany) language - ditto with cmd-shift-E and English (UK).

If you use more than two languages, you could write a more sophisticated macro with a list of language codes/numbers (the OOo BASIC uses numbers for language codes), so you could hit e.g. cmd-shift-L on the selected text and just enter a language code in a popup box and it would do the rest.

Using Styles and Templates

offers an alternative solution using styles and the default template styles:

Working in a multi-lingual international office, we've set-up a single document template with multiple paragraph styles which share all the same font choices (e.g. Times, 9pt, space before or after, as you like) except for the associated language. So we can now have Text Body FR, Text Body ES, Text Body IT, Text Body DE etc. available in the same document as the original Text Body which we have set language as English. So, subject to the supported language dictionaries being installed, it is now as simple to create a multi-language document as it is to create a document in any one of the supported languages. Just choose the appropriate language paragraph style for each paragraph as you go...

Spell checking is automatically associated with the appropriate dictionary by the language setting in the paragraph style.

Personal tools