For me this worked, but I only tested a few cases:
clif_displaymessage(sd->fd,job_name(job-4));
Edit:
Since this is stored as it is sent from the client and the requests are also processed like that, there currently is no translation table on serverside. Therefore you might need an array like this for jobs and another one for the maps:
int jobs[] = {
// Roles
JOB_NOVICE, // think of something here
JOB_NOVICE,
JOB_NOVICE,
JOB_NOVICE,
// 1st
JOB_SWORDMAN,
JOB_MAGE,
JOB_ARCHER,
JOB_ACOLYTE,
JOB_MERCHANT,
JOB_THIEF,
// 2nd
JOB_KNIGHT,
JOB_PRIEST,
JOB_WIZARD,
JOB_BLACKSMITH,
JOB_HUNTER,
JOB_ASSASSIN,
JOB_CRUSADER,
JOB_MONK,
JOB_SAGE,
JOB_ROGUE,
JOB_ALCHEMIST,
JOB_BARD,
JOB_DANCER,
// 3-1
JOB_RUNE_KNIGHT,
JOB_WARLOCK,
JOB_RANGER,
JOB_ARCH_BISHOP,
JOB_MECHANIC,
JOB_GUILLOTINE_CROSS,
// 3-2
JOB_ROYAL_GUARD,
JOB_SORCERER,
JOB_MINSTREL,
JOB_WANDERER,
JOB_SURA,
JOB_GENETIC,
JOB_SHADOW_CHASER,
// 1st High
JOB_SWORDMAN_HIGH,
JOB_MAGE_HIGH,
JOB_ARCHER_HIGH,
JOB_ACOLYTE_HIGH,
JOB_MERCHANT_HIGH,
JOB_THIEF_HIGH,
// 2nd High
JOB_LORD_KNIGHT,
JOB_HIGH_PRIEST,
JOB_HIGH_WIZARD,
JOB_WHITESMITH,
JOB_SNIPER,
JOB_ASSASSIN_CROSS,
JOB_PALADIN,
JOB_CHAMPION,
JOB_PROFESSOR,
JOB_STALKER,
JOB_CREATOR,
JOB_CLOWN,
JOB_GYPSY,
// Other
JOB_WEDDING,
JOB_NOVICE_HIGH,
JOB_SUPER_NOVICE,
JOB_GUNSLINGER,
JOB_NINJA,
JOB_TAEKWON,
JOB_STAR_GLADIATOR,
JOB_SOUL_LINKER,
};
Then you can show the jobname with:
clif_displaymessage(sd->fd,job_name(jobs[job[i]-1]));
But you need to define the roles with hardcoded strings...
I know that this is not the answer you wanted to hear, but it is like that at the moment and that might also be the reason why there is no custom option for such a feature in rAthena.