-
Notifications
You must be signed in to change notification settings - Fork 3
/
install-language-packages
29 lines (24 loc) · 1.01 KB
/
install-language-packages
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
# install-language-packages
# Utilties - Install language packages
# Installing language packages for your locale different than English.
echo -e "Running: Utilties - Install language packages - ./scripts/install-language-packages"
# Get system language (locale)
SYS_LANGUAGE=`locale | grep LANG | cut -d= -f2 | cut -d_ -f1`
SYS_LANGUAGE2=$SYS_LANGUAGE
## Solve problem when locale is not set at all
if [[ $SYS_LANGUAGE == "C.UTF-8" ]] ; then
SYS_LANGUAGE="en"
SYS_LANGUAGE2="en-us"
fi
if [[ ! $SYS_LANGUAGE == "en" ]] ; then
sudo apt-get install -y manpages-$SYS_LANGUAGE
fi
sudo apt-get install -y aspell-$SYS_LANGUAGE firefox-locale-$SYS_LANGUAGE language-pack-gnome-$SYS_LANGUAGE language-pack-gnome-$SYS_LANGUAGE-base language-pack-$SYS_LANGUAGE language-pack-$SYS_LANGUAGE-base wpolish &&
sudo apt-get install -y hyphen-$SYS_LANGUAGE2 libreoffice-help-$SYS_LANGUAGE2 libreoffice-l10n-$SYS_LANGUAGE2 mythes-$SYS_LANGUAGE2 &&
if [ $? -eq 0 ]; then
echo -e "\\nOK\\n"
exit 0
else
echo -e "\\nFAIL\\n"
exit 1
fi