+# Default language
+sub commandA1 {
+ print "SquirrelMail attempts to set the language in many ways. If it\n";
+ print "can not figure it out in another way, it will default to this\n";
+ print "language. Please use the code for the desired language.\n";
+ print "\n";
+ print "[$WHT$squirrelmail_default_language$NRM]: $WHT";
+ $new_squirrelmail_default_language = <STDIN>;
+ if ( $new_squirrelmail_default_language eq "\n" ) {
+ $new_squirrelmail_default_language = $squirrelmail_default_language;
+ } else {
+ $new_squirrelmail_default_language =~ s/[\r|\n]//g;
+ $new_squirrelmail_default_language =~ s/^\s+$//g;
+ }
+ return $new_squirrelmail_default_language;
+}
+# Default Charset
+sub commandA2 {
+# print "This option controls what character set is used when sending\n";
+# print "mail and when sending HTML to the browser. Do not set this\n";
+# print "to US-ASCII, use ISO-8859-1 instead. For cyrillic, it is best\n";
+# print "to use KOI8-R, since this implementation is faster than most\n";
+# print "of the alternatives\n";
+ print "This option is obsolate. Default charset depends on language\n";
+ print "you have selected in \"Default language\" option.\n";
+ print "\n";
+
+ print "[$WHT$default_charset$NRM]: $WHT";
+ $new_default_charset = <STDIN>;
+ if ( $new_default_charset eq "\n" ) {
+ $new_default_charset = $default_charset;
+ } else {
+ $new_default_charset =~ s/[\r|\n]//g;
+ }
+ return $new_default_charset;
+}
+# Alternative language names
+sub commandA3 {
+ print "Enable this option if you want to see localized language names in\n";
+ print "language selection box. Note, that if don't limit list of available\n";
+ print "languages, this option can trigger installation of foreign language\n";
+ print "support modules in some browsers.\n";
+ print "\n";
+
+ if ( lc($show_alternative_names) eq "true" ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Show alternative language names? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $show_alternative_names = <STDIN>;
+ if ( ( $show_alternative_names =~ /^y\n/i ) || ( ( $show_alternative_names =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $show_alternative_names = "true";
+ } else {
+ $show_alternative_names = "false";
+ }
+ return $show_alternative_names;
+}
+# Available languages
+sub commandA4 {
+ print "This option allows to limit number of languages available in\n";
+ print "language selection box. You can enter as code of every language that\n";
+ print "you want to enable. Language codes should be separated by space. If you\n";
+ print "enter name unsupported by SquirrelMail, it will be ignored. If you enter\n";
+ print "special key \'all\' - all languages available in SquirrelMail will be\n";
+ print "listed. If you enter special key \'none\' - user won't be able to change";
+ print "language and interface will use language set it \"Default language\" option.\n";
+ print "\n";
+ print "Valid language names are:\n";
+ print " ar (Arabic), bg_BG (Bulgarian), ca_ES (Catalan), cy_GB (Welsh)\n";
+ print " cs_CZ (Chech), da_DK (Danish), de_DE (German), el_GR (Greek),\n";
+ print " en_US (English), es_ES (Spanish), et_EE (Estonian), fi_FI (Finnish),\n";
+ print " fo_FO (Faroese), fr_FR (French), he_IL (Hebrew), hr_HR (Croatian),\n";
+ print " hu_HU (Hungarian), id_ID (Indonesian), is_IS (Icelandic), it_IT (Italian),\n";
+ print " ja_JP (Japanese), ko_KR (Korean), lt_LT (Lithuanian), ms_MY (Malay),\n";
+ print " nl_NL (Dutch), nn_NO (Norwegian (Nynorsk)), no_NO (Norwegian (Bokmal)),\n";
+ print " pl_PL (Polish), pt_BR (Portuguese (Brazil)), pt_PT (Portuguese (Portugal)),\n";
+ print " ro_RO (Romanian), ru_RU (Russian), sk_SK (Slovak), sl_SI (Slovenian),\n";
+ print " sr_YU (Serbian), sv_SE (Swedish), th_TH (Thai), tr_TR (Turkish),\n";
+ print " zh_CN (Chinese Simplified), zh_TW (Chinese Traditional).\n";
+ print "\n";
+ print "[$WHT$available_languages$NRM]: $WHT";
+ $new_available_languages = <STDIN>;
+ if ( $new_available_languages eq "\n" ) {
+ $new_available_languages = $available_languages;
+ } else {
+ $new_available_languages =~ s/[\r|\n]//g;
+ $new_available_languages =~ s/^\s+$//g;
+ }
+ return $new_available_languages;
+}
+# Agresive decoding
+sub commandA5 {
+ print "Enable this option if you want to use CPU and memory intensive decoding\n";
+ print "functions. This option allows reading multibyte charset, that are used\n";
+ print "in Eastern Asia. SquirrelMail will try to use recode functions here,\n";
+ print "even when you have disabled use of recode in Tweaks section.\n";
+ print "\n";
+
+ if ( lc($agresive_decoding) eq "true" ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Use agresive decoding? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $agresive_decoding = <STDIN>;
+ if ( ( $agresive_decoding =~ /^y\n/i ) || ( ( $agresive_decoding =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $agresive_decoding = "true";
+ } else {
+ $agresive_decoding = "false";
+ }
+ return $agresive_decoding;
+}
+
+# Advanced tree
+sub commandB1 {
+ print "Enable this option if you want to use DHTML based folder listing.\n";
+ print "Code is experimental, works only with some browsers and there might\n";
+ print "be some glitches.\n";
+ print "\n";
+
+ if ( lc($advanced_tree) eq "true" ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Use advanced tree in folder listing? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $advanced_tree = <STDIN>;
+ if ( ( $advanced_tree =~ /^y\n/i ) || ( ( $advanced_tree =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $advanced_tree = "true";
+ } else {
+ $advanced_tree = "false";
+ }
+ return $advanced_tree;
+}
+# Oldway
+sub commandB2 {
+ print "Setting $oldway to false causes left_main.php to use the new\n";
+ print "experimental way of getting the mailbox-tree.\n";
+ print "\n";
+
+ if ( lc($oldway) eq "true" ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Use advanced tree in folder listing? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $oldway = <STDIN>;
+ if ( ( $oldway =~ /^y\n/i ) || ( ( $oldway =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $oldway = "true";
+ } else {
+ $oldway = "false";
+ }
+ return $oldway;
+}
+# php recode
+sub commandB3 {
+ print "Enable this option if you want to use php recode functions to read\n";
+ print "emails written in charset that differs from the one that is set in\n";
+ print "translation selected by user. Code is experimental, it might cause\n";
+ print "errors, if email contains charset unsupported by recode or if your\n";
+ print "php does not have recode support.\n";
+ print "\n";
+
+ if ( lc($use_php_recode) eq "true" ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Use advanced tree in folder listing? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $use_php_recode = <STDIN>;
+ if ( ( $use_php_recode =~ /^y\n/i ) || ( ( $use_php_recode =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $use_php_recode = "true";
+ } else {
+ $use_php_recode = "false";
+ }
+ return $use_php_recode;
+}
+# php iconv
+sub commandB4 {
+ print "Enable this option if you want to use php iconv functions to read\n";
+ print "emails written in charset that differs from the one that is set in\n";
+ print "translation selected by user. Code is experimental, it works only\n";
+ print "with translations that use utf-8 charset. Code might cause errors,\n";
+ print "if email contains charset unsupported by iconv or if your php does\n";
+ print "not have iconv support.\n";
+ print "\n";
+
+ if ( lc($use_php_iconv) eq "true" ) {
+ $default_value = "y";
+ } else {
+ $default_value = "n";
+ }
+ print "Use advanced tree in folder listing? (y/n) [$WHT$default_value$NRM]: $WHT";
+ $use_php_iconv = <STDIN>;
+ if ( ( $use_php_iconv =~ /^y\n/i ) || ( ( $use_php_iconv =~ /^\n/ ) && ( $default_value eq "y" ) ) ) {
+ $use_php_iconv = "true";
+ } else {
+ $use_php_iconv = "false";
+ }
+ return $use_php_iconv;
+}
+
+