Welcome Guest, Not a member yet? Register   Sign In
Call to protected method CodeIgniter\Language\Language::load() from scope CodeIgniter
#1

Hi,

to load translation-files and create some dynamic content, i add theĀ language service to the _construct of my own library.

Code:
"function __construct(){ ... $this->lang = service('language');" ... }"

Now i want to load a language file by calling my lib inside a view-file in this way
Code:
"$ci->mytools->lang->load(filepath', $ci->mytools->request->getLocale(),true)"

The result is the error message: "Call to protected method CodeIgniter\Language\Language::load() from scope CodeIgniter\View\View"

What i do wrong - how i cann load a language file on each point i want?
Reply


Messages In This Thread
Call to protected method CodeIgniter\Language\Language::load() from scope CodeIgniter - by 4usol - 02-08-2025, 11:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB