diff options
author | Jesús <heckyel@hyperbola.info> | 2021-02-10 13:52:52 -0500 |
---|---|---|
committer | Jesús <heckyel@hyperbola.info> | 2021-02-10 13:52:52 -0500 |
commit | 7e95c3b667a1b353f8275db886203f272bfcce34 (patch) | |
tree | aefe3b7db69ac78b83b79a70cf43401679812d20 /hyperterm/core/languages.sh | |
download | hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.tar.lz hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.tar.xz hyperterm-7e95c3b667a1b353f8275db886203f272bfcce34.zip |
first commit
Diffstat (limited to 'hyperterm/core/languages.sh')
-rw-r--r-- | hyperterm/core/languages.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/hyperterm/core/languages.sh b/hyperterm/core/languages.sh new file mode 100644 index 0000000..e0876e6 --- /dev/null +++ b/hyperterm/core/languages.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +################### +# Message functions +################### + +# firts arguments is spanish +# second arguments is english + +function msg() { + case ${LANG/_*/} in + es) + printf '%s\n' "$1" + ;; + *) + printf '%s\n' "$2" + ;; + esac +} + +function msg_err() { + case ${LANG/_*/} in + es) + printf '%s\n' "$1" >&2 + ;; + *) + printf '%s\n' "$2" >&2 + ;; + esac +} |