|
From: Ruediger H. <hae...@us...> - 2005-07-13 20:50:48
|
Update of /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21102 Modified Files: function.pncCategoryPath.php Log Message: Enable translations for category names Index: function.pncCategoryPath.php =================================================================== RCS file: /cvsroot/pn-commerce/pn-commerce/pntemplates/plugins/function.pncCategoryPath.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** function.pncCategoryPath.php 2 Jul 2004 14:49:46 -0000 1.5 --- function.pncCategoryPath.php 13 Jul 2005 20:50:39 -0000 1.6 *************** *** 69,78 **** { break; ! } if( $categoryentry['ID'] == $startcategoryid ) { // we reached the starting category (the one recently shown) so we simply // show its name here instead of showing a redundant link ! $cattree .= $categoryentry['Name']; } else --- 69,85 ---- { break; ! } ! // try to translate the category name ! $categoryname = constant($categoryentry['Name']); ! if ($categoryname == "") ! { ! // no translation found, use original text ! $categoryname = $categoryentry['Name']; ! } if( $categoryentry['ID'] == $startcategoryid ) { // we reached the starting category (the one recently shown) so we simply // show its name here instead of showing a redundant link ! $cattree .= $categoryname; } else *************** *** 84,88 **** 'Function' => 'categoryview', 'Args' => array( 'CategoryID' => $categoryentry['ID'] ) ) ); ! $cattree .= "<a $class href='$url'>".$categoryentry['Name']."</a> $separator "; } } --- 91,95 ---- 'Function' => 'categoryview', 'Args' => array( 'CategoryID' => $categoryentry['ID'] ) ) ); ! $cattree .= "<a $class href='$url'>".$categoryname."</a> $separator "; } } |