From 7e95c3b667a1b353f8275db886203f272bfcce34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs?= Date: Wed, 10 Feb 2021 13:52:52 -0500 Subject: first commit --- hyperterm/core/languages.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 hyperterm/core/languages.sh (limited to 'hyperterm/core/languages.sh') 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 +} -- cgit v1.2.3