Post by joeyannaphol » Sat Dec 26, 2015 1:36 pm

HI,

I'm on Opencart version 2.1.0.1 and just installed the Thai language extension pack.

I'm having trouble seeing the translated text for "About Us, Delivery Information, Privacy Policy and Terms & Conditions" in the footer (see attached file)
Screenshot002.jpg

Screenshot002.jpg (20.91 KiB) Viewed 8190 times

When I click on the link, the page titles are in English: http://thailandfromabroad.com/index.php ... ation_id=4.

Below are code that seems relevant - it seems like the names are coming from the database. Can someone please help?
  • 1. Catalog/controller/common/footer.php is calling getInformations()

    Code: Select all

    $this->load->model('catalog/information');
    
    		$data['informations'] = array();
    
    		foreach ($this->model_catalog_information->getInformations() as $result) {
    			if ($result['bottom']) {
    				$data['informations'][] = array(
    					'title' => $result['title'],
    					'href'  => $this->url->link('information/information', 'information_id=' . $result['information_id'])
    				);
    			}
    		}
    2. getInformations() is coming from catalog/model/catalog/information.php

    Code: Select all

    public function getInformations() {
    		$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "information i LEFT JOIN " . DB_PREFIX . "information_description id ON (i.information_id = id.information_id) LEFT JOIN " . DB_PREFIX . "information_to_store i2s ON (i.information_id = i2s.information_id) WHERE id.language_id = '" . (int)$this->config->get('config_language_id') . "' AND i2s.store_id = '" . (int)$this->config->get('config_store_id') . "' AND i.status = '1' ORDER BY i.sort_order, LCASE(id.title) ASC");
    
    		return $query->rows;
    	}
    3. All of this is getting displayed by catalog/view/theme/default/template/common/footer.tpl

    Code: Select all

    <div class="row">
          <?php if ($informations) { ?>
          <div class="col-sm-3">
            <h5><?php echo $text_information; ?></h5>
            <ul class="list-unstyled">
              <?php foreach ($informations as $information) { ?>
              <li><a href="<?php echo $information['href']; ?>"><?php echo $information['title']; ?></a></li>
              <?php } ?>
            </ul>
          </div>
          <?php } ?>
How do I show the links in Thai? Will these About pages support both English and Thai like the other pages?

Thanks!

Newbie

Posts

Joined
Sat Dec 26, 2015 1:14 pm

Post by joeyannaphol » Sun Dec 27, 2015 7:41 am

Found it - if i go to admin page --> information and just change the title language there, it will work!

Newbie

Posts

Joined
Sat Dec 26, 2015 1:14 pm
Who is online

Users browsing this forum: No registered users and 10 guests