Typing in a non-English language is a problem for many language learners not familiar with configuring their computers. This article suggests a way of setting up a Linux system so that it is easy to produce the special characters required without having to dig into your system’s configuration screens once you’ve set things up.
One of my hobbies is learning languages. I was useless at languages in school, so I’ve spent the last thirty years or so trying to make up, with the result that for the last six years or so I’ve been following Open University courses in French and Spanish with a view, one day, to getting a degree.
Open University courses like these involve a fair bit of typing in the target language. There are essays to write and forum posts to make as well as other, less formal, bits of written communication. A constant problem that students have to deal with, therefore, is how to produce the various accented letters that they may need.
There is help available for Windows users and some for Mac OS/X users too; but you’ll see very little around that solves the problem for Linux users. So here’s my solution.
Firstly let me say that I think it’s much easier to use a keyboard set up for the language in question. Trying to type in another language using an English keyboard configuration is always going to be difficult. At the very least, you’re going to have to remember a lot of keyboard shortcuts. So why not use the keyboard setup that native typists use? If it works for them, it should work for us.
You can, of course, buy a native keyboard and plug it into a USB slot or something. Many people find, though, that it’s simple enough to carry on using the standard (English) keyboard. You just have to remember which keys are different; which isn’t normally a problem as they’re not that many, at least if you’re learning another Latin alphabet-based language. Certainly it’s easier than remembering all those special Windows ‘Alt’ codes that I see other people using. Of course, if you’re learning Russian or Greek, a physical, native keyboard may make more sense.
My language of interest for the moment is Spanish, so this article describes how to set up a Spanish keyboard on an Ubuntu-based system, but it should be sufficiently general to apply to any setup. The laptop I’m actually using is running Ubuntu 11.10 with the Unity interface. If anyone wants to contact me with details about any other systems I’ll be glad to either modify this article or write another one based on what I’m told.
Let’s get to it, then.
The first thing to do is to get up the keyboard configuration tool. In Ubuntu with Unity you do this by activating ‘Dash Home’ and searching for something like, ‘keyboard’. In other distributions, use whatever application search tool the distribution provides. The first three letters of that search term will normally be enough for you to see the application, “Keyboard Layout” offered or its equivalent for other distributions. Select it.
Assuming you are using the Ubuntu “Keyboard Layout” application, in the dialog that appears when the application starts, you should see your currently configured keyboards listed. This probably means that only English is listed. Click on the ‘+’ button at bottom left to add another configuration. This displays another dialog with a list of available languages: hundreds of them.
Scroll through the language list until you find the one you want, which will be “Spanish” in this case. If you want a particular variant of Spanish, you will also find that on the list. This is true for other languages as well, such as French or English.
Select the language you want and click on the ‘Add’ button. The new language will now be listed in the original dialog. That’s it. That’s all you have to do. Dismiss the Keyboard Layout application.
When you return to your Desktop, you will see that you now have a keyboard icon in the task bar at the top of the Unity interface. This symbol only appears if you have more than one keyboard layout configured. The language code for the currently selected language will be shown to the right of the icon.
To change to a different keyboard layout, simply click on the icon and select the language you want from the drop down list. So, if I want to type special Spanish characters in the way that Spanish typists do it, I just select ‘Spanish’ from the list and I can type;
Á á É é Í í Ñ ñ Ó ó Ú ú ¿ ? ¡
This is how you get them:
- To get a letter with an acute accent (acento agudo), like é or É for example, simply hit what would on an English keyboard be the apostrophe ( ‘ ) and then type the letter on which you want the accent
- To get an umlaut (crema), like ü or Ü, type [Shift]['] followed by the letter on which you want the umlaut
- To get ñ, type a semicolon ( ; ). Or [Shift][;] to get Ñ.
- For ¿, type the plus sign ( + )
- For ?, type the underscore ( _ )
- For ¡, type the equals sign ( = )
- To get the º and ª symbols that are used with ordinal numbers (for example: La 10ª), type the backtick ( ` ) or [Shift][`] respectively
Of course you need to know as well, where things like the semicolon have gone. To assist you with this, you can find a full comparison between English and Spanish keyboards in this table [PDF]. There are about twenty differences in total, but most of them are to produce characters that are not often used, such as the back tick ( ` ) and the caret ( ^ ).
Reverting to an English keyboard is just as easy.
So once you have things set up, changing keyboards is just two mouse clicks away. And you can have as many keyboards configured as you like. Fantastic.