Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted March 24, 20196 yr This is a minor annoyance since we generally don't need to call it often, but the simple task of creating language strings takes such a long method call \IPS\Member::loggedIn()->language()->addToStack('') I actually have a live template set up for this, but that's a static method call and two consecutive method calls for a common task. It makes sense that we would, under most sane circumstances, always want to add a language string from the current logged in members set language, so defining this method in \IPS\Lang itself seems like a non-issue to me. i.e., \IPS\Lang::addToStack('') This is much easier to read and type.
March 24, 20196 yr $member->language()->addToStack( 'seems_easy_enough' ); just use $member = \IPS\Member::loggedIn(); at the top of the function etc
Archived
This topic is now archived and is closed to further replies.