#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <locale.h>
int main(void) {
    locale_t loc = newlocale(LC_ALL_MASK, "en_US.utf8", NULL);
    if (loc == 0) {
        printf("NEW: %d %s\n", errno, strerror(errno));
        return 1;
    }
     if (uselocale(loc) == 0) {
        printf("USE: %d %s\n", errno, strerror(errno));
        return 1;
    }
    for (int i = 0; i < 50; i++)
        printf("%d %s\n", i, strerror(i));
        
    freelocale(loc);
    return 0;
}
$ ./error.elf 
0 Выполнено
1 Операция не позволена
2 Нет такого файла или каталога
3 Нет такого процесса
4 Прерван системный вызов
5 Ошибка ввода/вывода
...
ЧЯДНТ?
$ locale --all
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
POSIX
ru_RU.utf8
ru_UA.utf8






