src/helpers/I18n.php
public static function findActive(array $fieldValues, $onEmptyValue = '', $lang = null)
    {
        $langShortCode = $lang ? $lang : Yii::$app->adminLanguage->getActiveShortCode();
    
        return array_key_exists($langShortCode, $fieldValues) ? $fieldValues[$langShortCode] : $onEmptyValue;
    }
public static function findActive(array $fieldValues, $onEmptyValue = '', $lang = null)
    {
        $langShortCode = $lang ? $lang : Yii::$app->adminLanguage->getActiveShortCode();
    
        return array_key_exists($langShortCode, $fieldValues) ? $fieldValues[$langShortCode] : $onEmptyValue;
    }
public static function findActive ( array $ fieldValues , $ onEmptyValue = '' , $ lang = null ) { $ langShortCode = $ lang ? $ lang : Yii :: $ app -> adminLanguage -> getActiveShortCode ( ) ; return array_key_exists ( $ langShortCode , $ fieldValues ) ? $ fieldValues [ $ langShortCode ] : $ onEmptyValue ; }
Find the corresponding element inside an array for the current active language.

```php
// assume the default language is `en`
$output = I18n::findActive(['de' => 'Hallo', 'en' => 'Hello']);

echo $output; // output is "Hello"
```

@param array $fieldValues The array you want to to find the current
@param mixed $onEmptyValue The value you can set when the language could not be found
@param string $lang The language to return, if no lang is provided, the language resolved trough the admin ui (or user language) is used by default.
@return mixed
Find the corresponding element inside an array for the current active language .