Admin ->System -> Localisation -> Countries
Admin ->System -> Localisation -> Zones
As mentioned they are not language dependent so keep that in mind.
Admin ->System -> Localisation -> Zones
As mentioned they are not language dependent so keep that in mind.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
depends on how many languages you have now and in the future.
I only have two so I just added a column to the country and zone tables for those names and changed the original name column to name_en.
name_en and name_zh, using the _language-code appendix.
If you have many languages, it would become more economical to put the name in a separate table.
then in model localization country I altered the queries (to select that name field based on language code) from
to
and
to
so the rest of the code remains the same, the queries just return the name in english or chinese depending on the current language code.
same principle for the zones
You just have to remember that if you add a language, you also have to add a column with the name+language code appendix to those tables or you will get an sql error.
I only have two so I just added a column to the country and zone tables for those names and changed the original name column to name_en.
name_en and name_zh, using the _language-code appendix.
If you have many languages, it would become more economical to put the name in a separate table.
then in model localization country I altered the queries (to select that name field based on language code) from
Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE country_id = '" . (int)$country_id . "' AND status = '1'");
Code: Select all
$query = $this->db->query("SELECT country_id,name_".$this->language->data['code']." as name,iso_code_2,iso_code_3,address_format,postcode_required, status FROM " . DB_PREFIX . "country WHERE country_id = '" . (int)$country_id . "' AND status = '1'");
Code: Select all
$query = $this->db->query("SELECT * FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name ASC");
Code: Select all
$query = $this->db->query("SELECT country_id,name_".$this->language->data['code']." as name,iso_code_2,iso_code_3,address_format,postcode_required, status FROM " . DB_PREFIX . "country WHERE status = '1' ORDER BY name DESC");
same principle for the zones
You just have to remember that if you add a language, you also have to add a column with the name+language code appendix to those tables or you will get an sql error.
Crystal Light Centrum Taiwan
Extensions: MailQueue | SUKHR | VBoces
“Data security is paramount at [...], and we are committed to protecting the privacy of anyone who is associated with our [...]. We’ve made a lot of improvements and will continue to make them.”
When you know your life savings are gone.
Who is online
Users browsing this forum: Bing [Bot] and 347 guests