Blame Scripts/Bash/Functions/Locale/locale_getCurrentLanguageCode.sh

a8d460
#!/bin/bash
a8d460
#
a8d460
# locale_getCurrentLanguageCode.sh -- This function checks LANG
a8d460
# environment variable and returns the current locale information in
a8d460
# the LL format.
a8d460
#
a8d460
# Copyright (C) 2009, 2010, 2011, 2012 The CentOS Project
a8d460
#
a8d460
# This program is free software; you can redistribute it and/or modify
a8d460
# it under the terms of the GNU General Public License as published by
a8d460
# the Free Software Foundation; either version 2 of the License, or (at
a8d460
# your option) any later version.
a8d460
#
a8d460
# This program is distributed in the hope that it will be useful, but
a8d460
# WITHOUT ANY WARRANTY; without even the implied warranty of
a8d460
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
a8d460
# General Public License for more details.
a8d460
#
a8d460
# You should have received a copy of the GNU General Public License
a8d460
# along with this program; if not, write to the Free Software
a8d460
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
a8d460
#
a8d460
# ----------------------------------------------------------------------
a8d460
# $Id: locale_getCurrentLanguageCode.sh 5653 2012-09-16 20:37:21Z al $
a8d460
# ----------------------------------------------------------------------
a8d460
a8d460
function locale_getCurrentLanguageCode {
a8d460
a8d460
    # Output current language code.
a8d460
    locale_getCurrentLocale | cut -d'_' -f1
a8d460
a8d460
}
a8d460