In a widget inside a module, I loaded a language file using
$this->load->lang('application')
However, PyroCMS returns this error
An Error Was Encountered
Unable to load the requested language file: language/english/application_lang.php
I am sure(and double checked) that the module has that language file. So why can’t PyroCMS load it? Is it checking only in the default PyroCMS system language files and not in the module language files perhaps?
EDIT: It seems to be that it is the case. When I tried adding application_lang in the system language folder, the error is gone. Is this expected behaviour?
Which version of PyroCMS are you using?
In 1.3.2, you should use something like the following:
This will cause Pyro to look for the language file in:
I believe lang(‘…’) is indeed reserved for system language files.
Hope that helps!