Results 1 to 10 of 22

Thread: HOWTO Make Gnome Keyboard Indicator Show Country Flags

Threaded View

  1. #1
    Join Date
    Oct 2005
    Beans
    232
    Distro
    Ubuntu 12.04 Precise Pangolin

    HOWTO Make Gnome Keyboard Indicator Show Country Flags

    This was written with Ubuntu Feisty (Gnome) in mind (See the NOTE in #6 below for a comment on Edgy).

    I found out about this (mostly) on a Russian language Ubuntu site at:
    http://www.nabble.com/%D0%A4%D0%BB%D...-t3639724.html.

    1. If you haven't got a language indicator, right click on a panel and select "Add to Panel", find "Keyboard Indicator" near the bottom of the pop up dialogue, highlight it and click "Add", then "Close".

    2. When the indicator appears on the panel, right click it and choose "Keyboard Preferences". Select the "Layouts" tab and use the "Add" button to choose your languages (Gnome only allows four). Put a check by the language you want as default. Close the dialogue. You should have a language indicator showing some not terribly esthetic text. Click on it to change languages.

    3. Now, you need flag images. The above mentioned site links to two images, one for the US flag and one for the Russian. These are at:

    http://forum.ubuntu.ru/index.php?act....0;attach=1226 - us.png
    http://forum.ubuntu.ru/index.php?act....0;attach=1227 - ru.png

    I don't need Russian, but since these folks had done the work, I downloaded the images to find out the proper sizes. The images are (width) 64 x (height) 43 pixels.

    If you can't find suitable flags, going to Wikipedia and searching for a country name will bring you to a page which includes the country's flag. It can be downloaded by right-click>Save image as... I didn't take these myself, but someone told me he got some there. A brief look at their site didn't seem to reveal any legal problem downloading - especially since it's only for your own desktop. It's even OK for your web site (with acknowledgment of the source [see their page for details]).

    These are much larger images than you need*, so right click the image and select "Open with > the Gimp". When the image opens in the Gimp, right click it and select "Image>Scale Image". In the dialogue box, change the width to 64. The height should take care of itself and come out around 42-47 (as mentioned, theirs are 64x43). Hit the "Scale" button and close.

    Then, in the File menu, choose "Save as..." and, leaving the .png format, name the image according to the standard two letter country code, e.g., us.png, es.png, fr.png etc. (Use the country names as found in the keyboard indicator as in #2 above ... the system recognizes languages by those country names. So, for Spanish, you must use "es.png", not "Spanish.png" or "mx.png", etc... country names - not language names: "us", not "en" [you could use a Mexican flag as long as the image were named "es.png"]). Close the Gimp.

    *Noamr wrote,"You actually don't need all this GIMP stuff. You can just download the SVG file from wikipedia and put it in /usr/share/pixmaps/flags/XX.svg." I haven't tried that but, if it works for you, go for it!

    4. Place your flag images in /usr/share/pixmaps or ~/.icons/flags (I only tried the first). If cut and paste won't work because of permission issues, move them with the command line (example: sudo mv -i Desktop/cn.png /usr/share/pixmaps/cn.png).

    5. Go to Applications>System Tools>Configuration Editor. It seems to ship with Feisty but was not visible in my menu. If that's the case with you, try System>Preferences>Main Menu to open the Menu Editor. Find Applications>System Tools and see if it's there just waiting for you to put a check mark by it (and do that). Then you should see it in the Applications menu. You can also open it from a terminal by typing " gconf-editor" (no quotes). As a last resort, you can install it from Synaptic or apt-get (gconf-editor, gconf2-common, and gconf2).

    6. After you have the Configuration Editor open, go to Desktop>Gnome>Peripherals>Keyboard>Indicator and check the box on the right side that says "showFlags". Close the editor and you should have flags instead of text in your keyboard indicator. (The Russian page cited above gives different instructions, but they seem to be for another keyboard indicator applet).

    NOTE: Nanogeek, posting on the original thread for this howto, found that the above Configuration Editor selection did not work for Edgy, but was able to get the flags working by using this instead: Apps->gswitchit->Applet->showFlags (the selection mentioned on the Russian site). I have not tried this personally.

    When I first did this, the flags appeared quite small. After a reboot, they came back in a better size (maybe refreshing the panel would have done that).

    Also, at one point, my keyboards wouldn't switch. A reboot might have fixed that, but I was in the middle of a download, so I removed the indicator from the panel (AFTER removing all languages but one!). I then added the indicator back to the panel and put back the languages and it's been fine).

    Hope this is of help to someone.
    Last edited by Ingla; August 27th, 2007 at 01:24 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •