Originally Posted by
Trinity14
So you have copied your translated file to: includes/templates/YOUR_TEMPLATE/buttons/dutch
You may also need to change includes/templates/YOUR_TEMPLATE/css/stylesheet_css_buttons.css if there are any changes made to the default button width.
Hope that helps.
Thanks for the reply!
I've looked at the stylesheet_css_buttons.css, but as far as I can see the default button width hasn't been changed. I've also played with the translation files by changing
Code:
define('BUTTON_ADD_PRODUCTS_TO_CART_ALT','Geselecteerde artikelen toevoegen aan winkelwagen');
into
Code:
define('BUTTON_ADD_PRODUCTS_TO_CART_ALT','Add Selected Products to Cart');
in case the translated string was too long. But unfortunately no luck.
Below I've added the contents of stylesheet_css_buttons.css and the function zenCssButton (..\includes\functions\html_output.php). Maybe these contain a hint?
Code:
/**
* CSS Buttons Stylesheet
*
* Thanks to paulm for much of the content of the CSS buttons code
*
* @package templateSystem
* @copyright Copyright 2003-2005 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: stylesheet_css_buttons.css 2765 2006-01-01 21:15:45Z birdbrain $
*/
/* css buttons */
.cssButton, .cssButtonHover {
font-family: 'Oswald', sans-serif;
font-size:13px;
line-height:14px;
text-transform:uppercase;
color:#fff;
font-weight:400;
text-decoration:none!important;
background:#a49682;
display:inline-block;
padding:5px 4px 8px 5px;
cursor:pointer!important;
margin:0 2px;
}
a span{
width:auto!important;
}
.cssButton:hover,
.cssButtonHover {
font-family: 'Oswald', sans-serif;
font-size:13px;
line-height:14px;
text-transform:uppercase;
color:#fff;
font-weight:400;
text-decoration:none!important;
background:#595959;
display:inline-block;
padding:5px 4px 8px 5px;
cursor:pointer!important;
margin:0 2px;
}
.navNextPrevWrapper a,
.btn1 a{
text-decoration:none;
}
/* adding the styles below might be needed if the default button width is changed */
/* .button_continue_shopping, .button_shipping_estimator {width: 150px;} */
.small_delete, .button_prev, .button_next, .button_search {}
.button_sold_out_sm, .button_sold_out, .button_update_cart, .button_checkout, .button_login {}
.button_return_to_product_list, .button_add_selected {}
.button_in_cart{}
.button_submit {}
.button_update_cart {}
.button_update_cartHover {}
/*.innerbox#headernavcenter .boxtext .button_search {display:inline;}*/
/*---search-button---*/
#head-search .cssButton.search{
width:62px!important;
height:35px!important;
border:none;
background:url(../images/search.gif) no-repeat 0 0;
font-size:0;
cursor:pointer;
float:left;
margin:0;
}
#head-search .cssButtonHover.search{
width:62px!important;
height:35px!important;
border:none;
background:url(../images/search.gif) no-repeat 0 bottom;
font-size:0;
cursor:pointer;
float:left;
margin:0;
}
Code:
function zenCssButton($image = '', $text, $type, $sec_class = '', $parameters = '') {
// automatic width setting depending on the number of characters
$min_width = 80; // this is the minimum button width, change the value as you like
$character_width = 6.5; // change this value depending on font size!
// end settings
// added html_entity_decode function to prevent html special chars to be counted as multiple characters (like &)
$width = strlen(html_entity_decode($text)) * $character_width;
$width = (int)$width;
if ($width < $min_width) $width = $min_width;
$style = ' style="width: ' . $width . 'px;"';
// if no secondary class is set use the image name for the sec_class
if (empty($sec_class)) $sec_class = basename($image, '.gif');
if(!empty($sec_class))$sec_class = ' ' . $sec_class;
if(!empty($parameters))$parameters = ' ' . $parameters;
$mouse_out_class = 'cssButton' . $sec_class;
$mouse_over_class = 'cssButtonHover' . $sec_class . $sec_class . 'Hover';
// javascript to set different classes on mouseover and mouseout: enables hover effect on the buttons
// (pure css hovers on non link elements do work work in every browser)
$css_button_js .= 'onmouseover="this.className=\''. $mouse_over_class . '\'" onmouseout="this.className=\'' . $mouse_out_class . '\'"';
if ($type == 'submit'){
// form input button
$css_button = '<input class="' . $mouse_out_class . '" ' . $css_button_js . ' type="submit" value="' .$text . '"' . $parameters . $style . ' />';
}
if ($type=='button'){
// link button
$css_button = '<span class="' . $mouse_out_class . '" ' . $css_button_js . $style . ' > ' . $text . ' </span>'; // add $parameters ???
}
return $css_button;
}
Bookmarks