X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=blobdiff_plain;f=admin%2Finst_lang.php;h=e1fbd0636270513e6011633853efbdb5d64eb535;hb=34bfbfad2dd0239174e03f7cce2b0bdcfa6a8a10;hp=54183e090dae1a694ad2c9eccd5ddafeb860a70c;hpb=cef4b4de401511a4195b7b8ad04b47bec1895b20;p=fa-stable.git diff --git a/admin/inst_lang.php b/admin/inst_lang.php index 54183e09..e1fbd063 100644 --- a/admin/inst_lang.php +++ b/admin/inst_lang.php @@ -31,7 +31,6 @@ simple_page_mode(true); function display_languages() { global $table_style, $installed_languages, $dflt_lang; - global $repository, $FA_repo_version; $th = array(_("Language"), _("Name"), _("Encoding"), _("Right To Left"), _("Installed"), _("Available"), _("Default"), "", ""); @@ -60,6 +59,9 @@ function display_languages() $langs = get_languages_list(); foreach ($langs as $pkg_name => $lng) { + if ($lng == 'C') // skip default locale (aka no translation) + continue; + $lang = $lng['code']; $lang_name = $lng['name']; $charset = $lng['encoding']; @@ -73,8 +75,7 @@ function display_languages() else alt_table_row_color($k); - $support = ($lang == 'en_GB') || - $_SESSION['get_text']->check_support($lang, $charset); + $support = $_SESSION['get_text']->check_support($lang, $charset); if (function_exists('gettext') && !$support && !get_post('DisplayAll')) continue; @@ -95,7 +96,7 @@ function display_languages() if (function_exists('gettext') && check_value('DisplayAll')) label_cell($support ? _("Yes") :_("No")); - if (!$available && ($lang != 'en_GB')) // manually installed language + if (!$available && ($lang != 'C')) // manually installed language button_cell('Edit'.$id, _("Edit"), _('Edit non standard language configuration'), ICON_EDIT); elseif (check_pkg_upgrade($installed, $available)) // outdated or not installed language in repo @@ -104,7 +105,7 @@ function display_languages() else label_cell(''); - if (($id !== null) && ($lang != $currlang) && ($lang != 'en_GB')) { + if (($id !== null) && ($lang != $currlang) && ($lang != 'C')) { delete_button_cell('Delete'.$id, _('Delete')); submit_js_confirm('Delete'.$id, sprintf(_("You are about to remove language \'%s\'.\nDo you want to continue ?"), @@ -205,7 +206,7 @@ function display_language_edit($selected_id) $_POST['code'] = $lang['code']; $_POST['name'] = $lang['name']; $_POST['encoding'] = $lang['encoding']; - if (isset($conn['rtl'])) + if (isset($lang['rtl']) && $lang['rtl'] === true) $_POST['rtl'] = $lang['rtl']; else $_POST['rtl'] = false;