Bij OpenCart staan deze strings in één apart taalbestand per view.
Die voor de cart in het Engels (en-GB) vind je onder:
opencart / upload / catalog / language / en-gb / common / cart.php
Voor het Nederlands (nl-NL) moet je een vergelijkbaar bestand vinden of aanmaken op hetzelfde niveau onder:
opencart / upload / catalog / language / nl-nl /
Wat verder altijd wel handig is: gebruik een editor zoals Notepad++ die naar strings kan zoeken in alle PHP-bestanden in een bepaalde directory inclusief subdirectory's.
Link gekopieerd
R
Roy de Wit
13-01-2016 14:21
gewijzigd op 13-01-2016 15:17
Maar hij staat ergens anders, want er is een theme geinstalleerd.
Toevoeging op 13/01/2016 14:29:46:
<?php if($this->registry->has('theme_options') == true) {
$theme_options = $this->registry->get('theme_options');
$config = $this->registry->get('config'); ?>
<!-- Cart block -->
<div id="cart">
<div class="cart-heading dropdown-toogle" data-hover="dropdown" data-toggle="dropdown">
<span><p style="float: left;margin:0; margin-right: 30px;" class="hidden-sm hidden-md"><?php if($theme_options->get( 'mycart_text', $config->get( 'config_language_id' ) ) != '') { echo html_entity_decode($theme_options->get( 'mycart_text', $config->get( 'config_language_id' ) )); } else { echo 'View Cart'; } ?></p> <span id="cart-total" style="float: right;"><?php echo $text_items; ?></span></span>
</div>
<div class="dropdown-menu" id="cart_content"><div id="cart_content_ajax">
<?php if ($products || $vouchers) { ?>
<div class="mini-cart-info">
<table>
<?php foreach ($products as $product) { ?>
<tr>
<td class="image">
<?php if ($product['thumb']) { ?>
<a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
<?php } ?>
</td>
<td class="name">
<a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
<div>
<?php foreach ($product['option'] as $option) { ?>
- <small><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br />
<?php } ?>
<?php if ($product['recurring']): ?>
- <small><?php echo $text_payment_profile ?> <?php echo $product['profile']; ?></small><br />
<?php endif; ?>
</div>
</td>
<td class="quantity">x <?php echo $product['quantity']; ?></td>
<td class="total"><?php echo $product['total']; ?></td>
<td class="remove"><a href="javascript:;" onclick="cart.remove('<?php echo $product['cart_id']; ?>');" title="<?php echo $button_remove; ?>"><img src="catalog/view/theme/<?php echo $config->get('config_template');?>/image/tg-remove.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>"/></a></td>
</tr>
<?php } ?>
<?php foreach ($vouchers as $voucher) { ?>
<tr>
<td class="image"></td>
<td class="name"><?php echo $voucher['description']; ?></td>
<td class="quantity">x 1</td>
<td class="total"><?php echo $voucher['amount']; ?></td>
<td class="remove"><img src="catalog/view/theme/<?php echo $config->get('config_template');?>/image/tg-remove.png" alt="<?php echo $button_remove; ?>" title="<?php echo $button_remove; ?>" onclick="(getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') ? location = 'index.php?route=checkout/cart&remove=<?php echo $voucher['key']; ?>' : $('#cart').load('index.php?route=module/cart&remove=<?php echo $voucher['key']; ?>' + ' #cart > *');" /></td>
</tr>
<?php } ?>
</table>
</div>
<div class="mini-cart-total">
<table>
<?php foreach ($totals as $total) { ?>
<tr>
<td class="right"><b><?php echo $total['title']; ?>:</b></td>
<td class="right"><?php echo $total['text']; ?></td>
</tr>
<?php } ?>
</table>
</div>
<div class="checkout">
<a href="<?php echo $cart; ?>" class="button"><?php echo $text_cart; ?></a>
<a href="<?php echo $checkout; ?>" class="button"><?php echo $text_checkout; ?></a>
</div>
<?php } else { ?>
<div class="empty"><?php echo $text_empty; ?></div>
<?php } ?>
</div></div>
<?php } ?>
Dit is de cart.tpl van het geinstalleerde Theme, maar hij haalt de taal ergens op maar deze veranderd die niet goed.
Link gekopieerd
Ja het is opgelost, maar waar kan ik dan de taal veranderen van "add to cart" als je over een product gaat?
Link gekopieerd
Ik ben zelf geen Opencart gebruiker, maar heb je al op die tekst gezocht met je editor?
Link gekopieerd
Ja, kan het nergens vinden
Link gekopieerd
Dan zit de vertaling mogelijk in je database, deze moet ergens vandaan komen eh?
Link gekopieerd