pfr is that file snippet above complete or is the ...
omitting some stuff?
The easiest thing to do is just re-use Pig
:
- Customize the standard message
$ cp /usr/src/lib/libc/nls/C.msg /tmp
$ vi /tmp/C.msg
- Generate the catalogue file:
# mv /usr/share/nls/Pig/libc.cat /usr/share/nls/Pig/libc.cat.orig
# gencat /usr/share/nls/Pig/libc.cat /tmp/C.msg
- Use
Pig
for language in the shell rc
file:
export LANG=Pig
You can also, I think, use export NLSPATH=/some/path/%L/%N.cat
after you copy libc.cat
to /some/path/$LANG
(The %L
stands for whatever $LANG
is in effect; and the %N
stands for the entity name.)
pfr And yes, totally serious.
Oh, Jay sus H.!
pfr I'm guessing I can just call a script that will play a short auto file using mpv or whatever?
Not quite. Error numbers (errno
--the number prefixing each message in that C.msg
file) are converted into language-specific strings by the standard C library, and that has restrictions on which of its own functions may safely be called from within itself.
What you want is not difficult, but, its futzing around with the libc
(and a separate program to handle the playback of either pre-recorded files or TTS generated sounds). I'll send you an e-mail when things are ready.