Tom S. Posted January 17, 2019 Share Posted January 17, 2019 I'm trying to load a language string using \IPS\Lang::load('sign_out'); But I get an OutOfRangeException::0 error. I've also tried passing the idField like so: \IPS\Lang::load('sign_out', 'word_key'); But there I get a InvalidArgumentException (0) error. Any idea what I'm doing wrong? Link to comment Share on other sites More sharing options...
Ryan Ashbrook Posted January 17, 2019 Share Posted January 17, 2019 \IPS\Lang::load() is meant to load an entire language pack. If you want to load an individual string, you need to do: \IPS\Member::loggedIn()->language()->addToStack( 'my_key' ); Link to comment Share on other sites More sharing options...
Tom S. Posted January 17, 2019 Author Share Posted January 17, 2019 Awesome thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.