| 1: | <?php
|
| 2: | namespace Opencart\Catalog\Controller\Event;
|
| 3: | |
| 4: | |
| 5: | |
| 6: | |
| 7: |
|
| 8: | class Translation extends \Opencart\System\Engine\Controller {
|
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: |
|
| 15: | public function index(string &$route, string &$prefix): void {
|
| 16: | $this->load->model('design/translation');
|
| 17: |
|
| 18: | $results = $this->model_design_translation->getTranslations($route);
|
| 19: |
|
| 20: | foreach ($results as $result) {
|
| 21: | if (!$prefix) {
|
| 22: | $this->language->set($result['key'], html_entity_decode($result['value'], ENT_QUOTES, 'UTF-8'));
|
| 23: | } else {
|
| 24: | $this->language->set($prefix . '_' . $result['key'], html_entity_decode($result['value'], ENT_QUOTES, 'UTF-8'));
|
| 25: | }
|
| 26: | }
|
| 27: | }
|
| 28: | }
|
| 29: | |