availible languages now only need to be added to setup/lang/languages to be availible in eGW:

- saves a db-update whenever a new lang comes availible
- maybe we should drop the availible column in phpgw_languages
This commit is contained in:
Ralf Becker 2004-06-13 21:31:21 +00:00
parent 26507a6aa7
commit 5709cc3a27
3 changed files with 23 additions and 21 deletions

View File

@ -427,19 +427,16 @@
$setup_tpl->set_var('lang_table_data',$btn_install_lang);
break;
case 10:
$langs_list = '';
reset ($GLOBALS['phpgw_info']['setup']['installed_langs']);
while (list ($key, $value) = each ($GLOBALS['phpgw_info']['setup']['installed_langs']))
$langs_list = array();
$languages = get_langs();
foreach ($GLOBALS['phpgw_info']['setup']['installed_langs'] as $key => $value)
{
if($value)
{
$langs_list .= ($langs_list?', ':'') . $value;
}
$langs_list[] = isset($languages[$key]) ? $languages[$key]['descr'] : $value;
}
$setup_tpl->set_var('lang_status_img',$completed);
$setup_tpl->set_var('lang_status_alt','completed');
$btn_manage_lang = $GLOBALS['phpgw_setup']->html->make_frm_btn_simple(
lang('This stage is completed<br>') . lang('Currently installed languages: %1 <br>',$langs_list),
lang('This stage is completed<br>') . lang('Currently installed languages: %1 <br>',implode(', ',$langs_list)),
'POST','lang.php',
'submit',lang('Manage Languages'),
'');

View File

@ -61,15 +61,13 @@
}
$select_box_desc = lang('Select which languages you would like to use');
$select_box = '';
$GLOBALS['phpgw_setup']->db->query($q="SELECT lang_id,lang_name FROM phpgw_languages WHERE available='Yes' ORDER BY lang_name");
while ($GLOBALS['phpgw_setup']->db->next_record())
foreach(get_langs() as $id => $data)
{
$id = $GLOBALS['phpgw_setup']->db->f('lang_id');
$select_box_langs =
@$select_box_langs
.'<option value="' . $id . '"'
.(@$GLOBALS['phpgw_info']['setup']['installed_langs'][$id]?' SELECTED':'').'>'
. $GLOBALS['phpgw_setup']->db->f('lang_name') . '</option>'
.(@$GLOBALS['phpgw_info']['setup']['installed_langs'][$id]?' SELECTED="1"':'').'>'
. $data['descr'] . '</option>'
."\n";
}

View File

@ -1,18 +1,25 @@
en English
cs Czech
da Danish
de Deutsch
es Español
en English
el Greek
es-es Español
es-ca Catalan
fi Suomi
fr Français
hu Hungarian
it Italiano
ja Japanese
ko Korean
zh Chinese(simplified)
zt Chinese(Taiwan)
pt Portuguese
hu Hungarian
da Danish
nl Dutch
no Norwegian
sv Swedish
pl Polski
pt Portuguese
pt-br Brazil
hu Hungarian
ru Russian
sl Slovensko
sv Swedish
uk Ukrainian
zh simplified Chinese
zt traditional Chinese (Taiwan)