My script must run a program with a specific language in order to work correctly, so I want it to check if this locale is accessible. I already used this hack, but I think there is a better way to do this.
grep ^ja_JP /etc/locale.gen &>/dev/null || echo >&2 "enable any of the japanese locales first"
source share