Jak nie działają? Pokazałem na screenie, że działają. W dodatku właśnie to robi ta metoda (get):
/**
* Get Language String
*
* @param string|array $key Language key or array of keys
* @return string|array Language string or array of key => string pairs
*/
public function get( $key )
{
$return = array();
$keysToLoad = array();
if ( \is_array( $key ) )
{
foreach( $key as $k )
{
if ( \in_array( $k, array_keys( $this->words ), true ) )
{
$return[ $k ] = $this->words[ $k ];
}
else
{
$keysToLoad[] = "'" . \IPS\Db::i()->real_escape_string( $k ) . "'";
}
}
if ( !\count( $keysToLoad ) )
{
return $return;
}
}
else
{
if ( isset( $this->words[ $key ] ) )
{
return $this->words[ $key ];
}
$keysToLoad = array( "'" . \IPS\Db::i()->real_escape_string( $key ) . "'" );
}
foreach( \IPS\Db::i()->select( 'word_key, word_default, word_custom', 'core_sys_lang_words', array( "lang_id=? AND word_key IN(" . implode( ",", $keysToLoad ) . ")", $this->id ) ) as $lang )
{
$value = $lang['word_custom'] ?: $lang['word_default'];
$this->words[ $lang['word_key'] ] = $value;
$return[ $lang['word_key' ] ] = $value;
}
/* If we're using an array, fill any missings strings with NULL to prevent duplicate queries */
if ( \is_array( $key ) )
{
foreach( $key as $k )
{
if ( !\in_array( $k, $return ) and ! array_key_exists( $k, $this->words ) )
{
$return[ $k ] = NULL;
$this->words[ $k ] = NULL;
}
}
}
if ( !\count( $return ) )
{
throw new \UnderflowException( ( \is_string( $key ) ? 'lang_not_exists__' . $key : 'lang_not_exists__' . implode( ',', $key ) ) );
}
return \is_string( $key ) ? $this->words[ $key ] : $return;
}