Author Topic: Global language definitions  (Read 2765 times)

Offline natdroid

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +30/-2
    • View Profile
    • Contact
Global language definitions
« on: June 02, 2014, 04:13:51 AM »
Hello. I've got a question. How to call global language definitions from extension?

yonghan

  • Guest
Re: Global language definitions
« Reply #1 on: June 02, 2014, 10:32:40 AM »
Hello,what do you mean by global language definition?

Offline abantecart

  • Administrator
  • Hero Member
  • *****
  • Posts: 4152
  • Karma: +251/-9
    • View Profile
    • Ideal Open Source Ecommerce Solution
Re: Global language definitions
« Reply #2 on: June 02, 2014, 06:58:12 PM »
Hello. I've got a question. How to call global language definitions from extension?

You can access only english (english.xml) block globally.
This is done by accessing language object
Code: [Select]
$this->language->get('text_key')This is if you are inside controller extended class.

Other languages modules you can load with
Code: [Select]
$this->loadLanguage('section/file');
After you load you can call same above get() method to get new loaded text_keys. 
« Last Edit: June 02, 2014, 07:01:21 PM by abantecart »
We need your help to build better free open source eCommerce platform for everyone.
See how you can help

Offline natdroid

  • Jr. Member
  • **
  • Posts: 98
  • Karma: +30/-2
    • View Profile
    • Contact
Re: Global language definitions
« Reply #3 on: June 03, 2014, 02:27:32 AM »
Thanks

 

Powered by SMFPacks Social Login Mod