Ask Your Question
1

Shortcut for changing language?

asked 2012-10-06 11:55:41 +0200

anonymous user

Anonymous

updated 2013-01-31 11:28:22 +0200

anonymous user

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?

delete close flag offensive retag edit

Comments

1 Answer

Sort by » oldest newest most voted
0

answered 2013-02-21 21:10:34 +0200

manj_k gravatar image manj_k
5774 4 33 50

updated 2013-02-21 21:39:42 +0200

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
link delete flag offensive edit

Login/Signup to Answer

Donate

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!

Question tools

Follow

subscribe to rss feed

Stats

Asked: 2012-10-06 11:55:41 +0200

Seen: 363 times

Last updated: Feb 21