How do I change languages in Mint? (while using OpenOffice mainly)
I have recently installed Linux Mint (Isadora) on my old -but still functioning- rustbucket of a PC, and its flying again! (Why didn't I leave Windows sooner?) Although I generally don't have many difficulties getting the hang of it, the issue of changing languages has got me beat. I could only find how to change keyboard layouts, but I can't seem to add more than 4 to the list. Now, because I need already 2 layouts for Greek, I am unable to write in all the languages that I need, so I wondered if there exists a button that I could put somewhere to change languages while writing and, if so, how I can add languages and use different layouts for each. Can someone help me?
|
What desktop environment?
|
Gnome.
|
(Posting from Mint in VirtualBox)
I just checked and it does seem to gray out the Add button when there are 4 layouts. I see no obvious technical reason for this. But I figured out a way to bypass this supposedly intentional limitation. Here's how:
Note that the extra layouts will not be accessible by clicking on the layout icon in the tray. You have to right-click it and choose it from the pop-up menu. |
Thank you very much! Do you know if it is also possible to change languages (instead of layouts), so that while writing I can change from one language to another, each with its own layout(s)?
|
...I thought that the layout changes the language you type in?
|
Well, yes and no. Some languages have more than one layout (e.g. Greek has one for monotonic and one for polytonic writing, Serbian one for Cyrillic and one for Latin alphabet, etc.). Although turning to a specific layout of course also changes the language, it would be much more easy and organised to be able to change languages and only see and be able to select between the layouts of the active language. In Windows this is standard (language bar), and it is one of the very few features of Windows that I like. Do you know if this is possible to be done in Mint (or any other edition of Linux)?
|
Quote:
And this has nothing to do with Linux, it has to do with the desktop environment (GNOME in your case). |
Thanks! There are probably ways to modify a desktop environment, do you know where I could find information about that?
|
As I said, I don't know. Either wait for another member to post and/or do some Google searches.
|
I found out today (while trying to write in French) that while it is possible to add new keyboard layouts by using the bypass MTK358 suggested, unfortunately those new layouts (past the first four) do not work. Instead you just get one of the original four (in my case polytonic Greek). I don't understand why the developers of the Gnome version of Mint set such a limitation, and I hope that in future editions multilinguals will be considered and the limitation removed. Meanwhile, can anyone advise me if there is a way to break this limitation of Gnome; or alternatively, if some other edition of Linux does not have this limitation?
|
I think that it's just a GNOME limitation, not Mint. And it's intentional.
And did you try switching using the right-click menu, not by left-clicking the icon? |
Yes, I tried using the right-click menu, but when I clicked French, I got polytonic Greek instead. Possibly Gnome has a built in limitation of four layouts that can't be bypassed (I can't understand why). Maybe I should switch to the KDE version of Mint. Do you know if that hasn't this limitation?
|
You don't need to "switch to the KDE version of mint", just install KDE using the package manager (the package is called "kde-full") and you will be able to choose between GNOME and KDE at the login screen.
|
You need the openoffice.org-l10n-xxx package for whatever language you want to use in OpenOffice,probably want the appropriate dictionary as well. you also need the appropriate fonts installed.
Choosing language settings - OpenOffice.org Wiki http://wiki.services.openoffice.org/...guage_settings For Gnome system>administration>language support you can define a shortcut key to switch languages, then you can do: Put your mouse on the top panel and right click on 'Add to Panel'. Next scroll down to Utilities and click on 'keyboard indicator'. That will allow you to switch between foo and English, if both are set up. Change the User Interface Language in Ubuntu - How-To Geek http://www.howtogeek.com/howto/17528...age-in-ubuntu/ |
Thanks, MTK358. I must say, I like KDE better, but my computer does not function as well with it as with Gnome (it's a really old one), so I 'll keep it for when needed.
Thank you also, craigevil. I have the language packages for OpenOffice with their dictionaries and fonts (plus a whole lot more fonts, as I am a font-maniac!). I couldn't find "system>administration>language support", so I went to language support from the control panel, but I could not find a way to define a shortcut-key. I must say that I am not interested in changing the language that Gnome names files and its functions, utilities, etc., but rather I want to change languages in text (txt, doc, rtf, odt, etc.) while writing. This means I need to change keyboard layouts, but I want them organised by language. I also couldn't find Utilities in the "Add to Panel" menu... Do you maybe know the commands for all this? |
Also, you might like to try Xfce. I don't know exactly what Mint package you have to install to get it, but i think you can probably figure it out.
Or, you can use the Code:
setxkbmap -layout en Just be sure that you somehow will be able to run it again to get back to your normal keyboard! In an extreme case, you can always use a character map application. |
I just fell in love with the terminal!!! With the command setxkbmap -layout <xx> I was finally able to bypass the limitation of four layouts set by GNOME! Thank you very much, MTK358!
One bit of advice to any who read this and will want to use non-latin layouts: before typing the command setxkbmap -layout ru (I'm using Russian as an example), make sure to type first the command for a latin layout (e.g. setxkbmap -layout fr) and then to switch to the non-latin layout, so that when you will want to switch back to your original layout you will be able to copy-paste the command for the latin layout you typed earlier and then type the command for the layout you want. If you don't do this you won't be able to give any command in the terminal, as it needs commands in latin characters! The only backdraw of this is that you have to memorise the two or three letter code for the languages you want (I'm still trying to figure out the code for Frysian)... |
There is another small backdraw at the use of the command mentioned at the previous two posts: The layouts set through the GUI are temporarely lost (until restart)...
|
I wonder why GNOME decided to do such a stupid thing...
It might be possible to remove that limitation, but that would require getting GNOME's source, modifying it, compiling it, and after all that trouble end up GNOME not being managed by ther package manager. |
I wonder very much too, I hope in the future this will be fixed...
I must say, I encountered the same limitation using KDE and Xfce. Assuming that it was because although I installed the respective packages the version of Mint remained Gnome (the introductory panel in KDE or Xfce session still stated Linux Mint Gnome), I have started to try out various Linux distros in VirtualBox. Until now I encounter still the same limitation! Is it possible that VirtualBox is influenced by my distro and so sets this limitation? It hardly seems possible. But the only other explanation I have is that besides Gnome also KDE and Xfce have this limitation (which I also find rather unbelievable). I am severely tempted to reformat my drive and install some other distro to see what will happen... |
It's IMPOSSIBLE for VirtualBox to affect this, both for the host and the guest OS.
|
That can only mean the KDE and Xfce have the same limitation! This is really getting very annoying. I will also check LXDE and Fluxbox out, hoping they will have escaped the menace of the four-language-limit. Do you know if there are distros which use their own desktop version and not one of the above?
|
It's kind of strange that other desktops would have the same limitation, but who knows. Also, there is no distro with its own custom DE. Maybe it's because they think clicking on the icon to cycle throught more than 4 layouts is a bad idea.
But that gave me an idea: why not write your own layout switcher app? I don't think it would be too difficult to write a small Qt GUI app that has an icon, and would execute the setxkbmap command behind the scenes to actually switch the layout. I just wonder is it would somehow interfere with the DE's layout switcher. |
I made a little example Python script that has a combo box that lets you choose the layout. Try it by putting it in a text file, giving it executable permissions, and running it. Make sure you have PyQt4 installed (the Mint package "pyqt4-dev-tools").
Code:
#!/usr/bin/env python |
Great idea!!! Thank you, MTK358!!! I will get to it right away (of course, as I am inexperienced in app-writing, it will take me some time). When I have made something satisfactory I will upload it and tell you about it...
By the way, I tried LXDE, but it is even worse than the rest. The only way to change layouts is with the setxkbmap-command... |
If you want to try writing it yourself, learn Python and PyQt4 first:
http://docs.python.org/tutorial/ http://zetcode.com/tutorials/pyqt4/ http://www.rkblog.rk.edu.pl/w/p/introduction-pyqt4/ Note that Qt is actually a C++ toolkit and PyQt4 is just a set of bindings, but Python is a far easier language for beginners. Also there's the GTK+ toolkit, but I think that Qt is much easier to work with and has friendlier documentation. And you can always ask here for help. |
Thank you very much, MTK358. I will get right to it...
By the way, I tried your example Python script, it works beautifully! (of course, you temporarily lose the layouts you have set through the DE's layout switcher, until reboot) |
I just wanted to point out a flaw in my example app:
I used QProcess.startDetached(), which doesn't wait for the clild process to exit before continuing, and that might interfere with the fact that another process wll simultaneously be started if you use the xmodmap and that might have unpredictable results. You should probably use Python's os.system() (be sure to import os first), which waits for the child process to exit before returning, instead of PyQt4's QtCore.QProcess.startDetached(). |
Any progress?
|
Unfortunately I didn't have the time to really set my mind to it the last weeks, it was a very busy time. Next month will be hopefully a little bit less hectic, so that I will have the time to get to it...
|
Issue Update
I noticed that in KDE 4 you have the ability to use more that 4 layouts. To activate this just check the "Spare Layouts" box in "System Settings>Input Devices>Keyboard>Layouts" and add any extra layouts you want. These spare layouts can only be accessed by right-clicking on the layout button in the system tray (or if you assign a shortcut key combination to a layout).
Still no solution in Gnome 3. I really have to sit down and write a program for this (even in KDE -although a big improvement of course- I still don't find it very well organised), but it's not easy to find the time when trying to live in practically bankrupt Greece... |
change language while writing
I have Linux mint 13 Maya:
how can I change language while writing from en to Russian or Arabia |
All times are GMT -5. The time now is 06:14 PM. |