First time here? Check out the FAQ!
asked 2012-10-06 11:55:41 +0200
Anonymous
The problem I initially faced is the exact opposite of this one. Using LibreOffice 3.5 on Linux (Mint 13), when I switch keyboard language between EN and GR (I suppose it's the same for all other non-latin alphabet languages) the "input language" in Libre Office doesn't change, which means that my GR text is considered EN or vice-versa. Given that the solutions proposed to similar questions so far don't work (Xneur doesn't recognize GR, and apparently there's no way to connect the system language to the document language in Linux, which is strange because that's exactly what happens in Windows), I decided to try a different approach and create a shortcut for switching languages, so that I don't have to manually select each and every EN word that pops up in a GR document (or vice versa). Unfortunately although I navigated through the multitude of categories and functions under Customize/keyboard, I've yet to find a "switch/change" languages command.
Can anyone help me create a keyboard shortcut for the command "switch/change language" in Libre office?
That's an "Windows-only" feature, see:
(1) http://www.openoffice.org/specs/appwide/linguistic/ → Set_Language_Attribute_for_Text.odt
1.5 Set Text Language to Input Language Automatically ... (page 12)
(2) OOo issue 1035
You may create a macro (via "Record Macro") with these steps (mouse clicks):
Menu "Tools → Language → For Selection → Language xyz"
(repeat it for each needed language).
Assign each macro to a shortcut key
(I have used Ctrl+Shift+6, ..., Ctrl+Shift+9,
see also: http://ask.libreoffice.org/en/question/3527/special-characters/?answer=3579#post-id-3579).
Apply the corresponding shortcut key to switch the language while typing ...
Sample
Recorded macro "Language → For Selection → French" (assigned to Ctrl+Shift+8):
sub select_fr
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
dim args1(0) as new com.sun.star.beans.PropertyValue
args1(0).Name = "Language"
args1(0).Value = "Current_French (France)"
dispatcher.executeDispatch(document, ".uno:LanguageStatus", "", 0, args1())
end sub
LibreOffice is made available by volunteers around the globe, backed by a charitable Foundation. Please support our efforts: Your donation helps us to deliver a better product!
Asked: 2012-10-06 11:55:41 +0200
Seen: 363 times
Last updated: Feb 21
Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.
See also → How can I auto-switch between languages in LibreOffice on Debian Linux?
manj_k ( 2013-02-24 17:48:36 +0200 )edit