I am developing a plugin for Opencart, in fact the plugin is over.
I'm just having trouble adding multi-language support
I can update the plugin database without needing it
I have problems with adding update text to multi-language input
Module related screen display admin/store/setting

The steps and codes I implement are as follows:
1) admin/view/template/setting/setting.tpl
Code: Select all
<div class="form-group required">
<label class="col-sm-2 control-label">Module test</label>
<div class="col-sm-10">
<?php foreach ($languages as $language) { ?>
<div class="input-group"><span class="input-group-addon"><img src="language/<?php echo $language
['code']; ?>/<?php echo $language['code']; ?>.png" title="<?php echo $language['name']; ?>" /></span>
<textarea name="config_fatih_test[<?php echo $language['language_id']; ?>]" cols="40"
rows="5"><?php echo isset($config_fatih_test[$language['language_id']]) ? $config_fatih_test[$language
['language_id']] : ''; ?></textarea>
</div>
<?php } ?>
</div>
</div>
Code: Select all
$this->load->model('localisation/language');
$data['languages'] = $this->model_localisation_language->getLanguages();
if (isset($this->request->post['config_fatih_test'])) {
$data['config_fatih_test'] = $this->request->post['config_fatih_test'];
} else {
$data['config_fatih_test'] = $this->config->get('config_fatih_test');
}
3) catalog/controller/product/product.php
Code: Select all
$this->load->model('localisation/language');
$data['languages'] = $this->model_localisation_language->getLanguages();
$data['config_fatih_test'] = $this->config->get('config_fatih_test');
The codes I tried to project a few types;
Code: Select all
<?php echo $config_fatih_test[$language['language_id']]; ?>
<?php echo $config_fatih_test; ?>
The problem I am experiencing is: Only this code on the product page worked <?php echo $config_fatih_test[$language['language_id']]; ?>
But when I change the language of the site, it does not change with the text on the dock,
fixed text remains, can you help in this?
Regards