WeBid Bug Tracking - WeBid
View Issue Details
0000605WeBid[All Projects] Generalpublic2016-10-08 10:142017-07-21 11:08
wikibit 
 
normalminoralways
newopen 
1.2.1 
 
0000605: Translation of the categories for the dropdownlist on the advanced search page does not work
I've added the dutch language to my site but I came across a weird issue :



I did translate all main categories from EN to NL, via the admin interface.

I see that the files are updated
and I see the translated categories in the dropdown for the search in the top navigation
but when I go into the advanced search page, there the dropdown list is still the EN version. In the file "categories_select_box.inc.php" all categories are translated to dutch
in the file "categories.inc.php" only the array "category names" is translated to dutch, the "category plain" is still the EN version
Swtich from EN to NL on the frontend of the website
in ADSEARCH.PHP, when when I change this :

[PHP]// category
$TPL_categories_list = '<select name="category">' . "\n";
if (isset($category_plain) && count($category_plain) > 0)
{
    $category = (isset($_SESSION['advs']['category'])) ? $_SESSION['advs']['category'] : '';
    foreach ($category_plain as $k => $v)
    {
        $TPL_categories_list .= "\t\t" . '<option value="' . $k . '" ' . (($k == $category) ? ' selected="true"' : '') . '>' . $v . '</option>' . "\n";
    }
}[/PHP]

into this :

[PHP]// category
$TPL_categories_list = '<select name="category">' . "\n";
if (isset($category_names) && count($category_names) > 0)
{
    $category = (isset($_SESSION['advs']['category'])) ? $_SESSION['advs']['category'] : '';
    foreach ($category_names as $k => $v)
    {
        $TPL_categories_list .= "\t\t" . '<option value="' . $k . '" ' . (($k == $category) ? ' selected="true"' : '') . '>' . $v . '</option>' . "\n";
    }
}[/PHP]
No tags attached.
Issue History
2016-10-08 10:14wikibitNew Issue
2016-10-08 10:16wikibitNote Added: 0001478
2016-11-23 10:59renlokNote Added: 0001479

Notes
(0001478)
wikibit   
2016-10-08 10:16   
in ADSEARCH.PHP, when when I change this :

[PHP]// category
$TPL_categories_list = '<select name="category">' . "\n";
if (isset($category_plain) && count($category_plain) > 0)
{
    $category = (isset($_SESSION['advs']['category'])) ? $_SESSION['advs']['category'] : '';
    foreach ($category_plain as $k => $v)
    {
        $TPL_categories_list .= "\t\t" . '<option value="' . $k . '" ' . (($k == $category) ? ' selected="true"' : '') . '>' . $v . '</option>' . "\n";
    }
}[/PHP]

into this :

[PHP]// category
$TPL_categories_list = '<select name="category">' . "\n";
if (isset($category_names) && count($category_names) > 0)
{
    $category = (isset($_SESSION['advs']['category'])) ? $_SESSION['advs']['category'] : '';
    foreach ($category_names as $k => $v)
    {
        $TPL_categories_list .= "\t\t" . '<option value="' . $k . '" ' . (($k == $category) ? ' selected="true"' : '') . '>' . $v . '</option>' . "\n";
    }
}[/PHP]

     
it seems to translate correctly.
Is this a bug in ADSEARCH.PHP ?
(0001479)
renlok   
2016-11-23 10:59   
In the categories language file are both arrays updated? Both $category_names and $category_plain?