-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
+# perl se buni ako nema postavljen defaultni locale
+# stavit cemo en_US.UTF-8
+
+if ! grep -q "^en_US.UTF-8 UTF-8" /etc/locale.gen; then
+ # generirat cemo najpotrebnije locale (HR, EN, te HR.UTF i EN.UTF8)
+ cp_check_and_sed '# en_US.UTF-8 UTF-8' \
+ 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' \
+ /etc/locale.gen || true
+
+ cp_check_and_sed '# en_US ISO-8859-1' \
+ 's/# en_US ISO-8859-1/en_US ISO-8859-1/g' \
+ /etc/locale.gen || true
+
+ cp_check_and_sed '# hr_HR ISO-8859-2' \
+ 's/# hr_HR ISO-8859-2/hr_HR ISO-8859-2/g' \
+ /etc/locale.gen || true
+
+ cp_check_and_sed '# hr_HR.UTF-8 UTF-8' \
+ 's/# hr_HR.UTF-8 UTF-8/hr_HR.UTF-8 UTF-8/g' \
+ /etc/locale.gen || true
+
+ locale-gen
+fi