aboutsummaryrefslogtreecommitdiffstats
path: root/hyperterm/core/languages.sh
blob: e0876e618feea5ddc5bb2353297391e4dfa15669 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
}