First of all, check your current keyboard language configuration (in this example the current configuration is ES, Spanish) :
# localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: es
X11 Layout: es
With this keyboard configuration you can use a Spanish QWERTY keyboard.
But, what if you need to change it to a French AZERTY keyboard you can follow the next steps :
For a permanent configuration
You can list all the French codes with the command :
# localectl list-keymaps | grep fr
And to change the configuration to a French AZERTY keyboard just execute :
# localectl set-keymap fr
And if you use a graphic interface, execute too the following :
# localectl set-x11-keymap fr
And then if you execute the status command, you will see the fr code in the current configuration :
# localectl status
System Locale: LANG=en_US.UTF-8
VC Keymap: fr
X11 Layout: fr
Other language codes :
You can configure your keyboard as well in English, German, Portuguese, Italian, Chinese or any other language.
For listing all the codes, just execute this command :
# localectl list-keymaps
...
us
us-mac
...
de
de-qwerty
...
pt
pt-latin1
...
it
it-mac
...
cn
cn-altgr-pinyin
...