Showing posts with label language. Show all posts
Showing posts with label language. Show all posts

Friday, October 13, 2017

[solved] diacritics/diuresis in linux

In Linux, we need the unicode number, and then convert it to hexidecimal. So for example, for ä, the unicode is 0228. Once converted to hex, it becomes 0e4.

To enter... 1) Ctrl-Shift simultaneously with the letter "u". That leaves an underlined "u" in the text. 2) type the last two or three digits of the hex code, eg...

á = 0e1
é = 0e9
ñ = 0f1
ä = 0e4
ö = 0f6
ü = 0fc
° = 0b0

...and 3) Enter or Spacebar.

chromium

Specific to Chromium, we often find Cyrillic or Chinese symbols are replaced by boxes. In such cases, we have to go to the evil Adobe empire. So, for example, for some of the Chinese fonts...

# pacman -S adobe-source-han-sans-otc-fonts

...but one simply needs to search on "adobe-source" and one will find their language. Close and reopen Chromium once complete.

Saturday, December 21, 2013

fbxkb - multi-language keyboard

Fbxkb does a simple job: sits in one's system tray and displays language status with a national flag. It's a GUI interface to bypass keystrokes for keyboard language switching.

One might guess fbxkb would be a 10MB app, but htop revealed fbxkb uses 156MB to do its thing. Luckily, my friend's system (on which it was needed) uses the relatively lean icewm Windows Manager. I found that 156MB did not affect performance. Additionally, the visual cue of a flag in the system tray saves guesswork. All told, satisfaction with fbxkb probably depends on a person's available RAM and their preference for a visual cue. Otherwise, just bind setxkbmap keystrokes (see below) and forgo fbxkb.

installation

The system onto which fbxkb was installed runs ArchLinux so I used yaourt to put it in.
$ yaourt -S fbxkb

configure

This friend wanted US and German keyboard options. I looked into /usr/share/X11/xkb/ for configuring, but we don't need to configure so deeply for a simple installation. Instead, add two lines to .xinitrc, and then invoke fbxkb with a single line in .icewm/startup:
$ nano .xinitrc
setxkbmap -layout us,de
# optional keystroke for shifting without GUI
setxkbmap -option grp:alt_shift_toggle 'us,de'

$ nano .icewm/startup
fbxkb &

This arrangement gave him the option to switch languages with Alt+Shift, or to switch using the fbxkb icon in the tray. Just click on the flag and it will toggle to the other flag, indicating the other keyboard mapping is operational. This also works for more than two languages. Although I just needed US and DE layouts, more options can be found here.