7.4. Language

When the live system boots, language is involved in three steps:

To define the locale that should be generated, use the locale parameter into the --bootappend-live option of lh_config, e.g.:

lh_config --bootappend-live "locale=sv_SE.utf8"

This parameter can also be used in kernel command line. You can specify a locale by a two-letters code, or for better control, by a full language_country.encoding word.

Both the console and X keyboard configuration depends on the keyb parameter of the --bootappend-live option. Valid options for X keyboard layouts can be found in /etc/X11/xkb/base.xml (rather limited to two-letters country codes). To find the value (the two characters) corresponding to a language try searching for the english name of the nation where the language is spoken, e.g:

$ grep -i sweden -C3 /etc/X11/xkb/base.xml | grep name
	<name>se</name>

To get the locale files for swedish generated and a swedish keyboard layout in X use:

lh_config --bootappend-live "locale=sv_SE.utf8 keyb=se"

A list of the valid values of the keyboards for the console can be figured with the following command:

for i in `find /usr/share/keymaps/ -iname "*kmap.gz"`; do basename $i | head -c -9; echo; done | sort | less 

To make the console keyboard use a swedish layout use

lh_config --bootappend-live "locale=sv_SE.utf8 keyb=se-latin1"

Alternatively, you can use the console-setup package, a tool to let you configure console layout using X (XKB) definitions; you can then setup your keyboard layout more precisely with klayout, kvariant, koptions and kmodel variables; live-initramfs will use also these parameters for X configuration. For example, to set up a french system with a french-dvorak layout (called Bépo) on a TypeMatrix keyboard, both in console and X11, use:

lh_config --bootappend-live \
  "locale=fr_FR.UTF-8 klayout=fr kvariant=bepo kmodel=tm2030usb"

Note that on old versions of console-setup (i.e. Lenny's one), you'll need to setup also the keyb variable to the klayout's value.