diff options
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 +} |