public function getLine(string $line, array $args = [])
	{
		// ignore requests with no file specified
		if (! strpos($line, '.'))
		{
			return $line;
		}

		// Parse out the file name and the actual alias.
		// Will load the language file and strings.
		[
			$file,
			$parsedLine,
		] = $this->parseLine($line, $this->locale);

		$output = $this->language[$this->locale][$file][$parsedLine] ?? null;

		if ($output === null && strpos($this->locale, '-'))
		{
			[$locale] = explode('-', $this->locale, 2);

			[
				$file,
				$parsedLine,
			] = $this->parseLine($line, $locale);

			$output = $this->language[$locale][$file][$parsedLine] ?? null;
		}

		// if still not found, try English
		if (empty($output))
		{
			$this->parseLine($line, 'en');
			$output = $this->language['en'][$file][$parsedLine] ?? null;
		}

		$output = $output ?? $line;

		if (! empty($args))
		{
			$output = $this->formatMessage($output, $args);
		}

		return $output;
	}
public function getLine(string $line, array $args = [])
	{
		// ignore requests with no file specified
		if (! strpos($line, '.'))
		{
			return $line;
		}

		// Parse out the file name and the actual alias.
		// Will load the language file and strings.
		[
			$file,
			$parsedLine,
		] = $this->parseLine($line, $this->locale);

		$output = $this->language[$this->locale][$file][$parsedLine] ?? null;

		if ($output === null && strpos($this->locale, '-'))
		{
			[$locale] = explode('-', $this->locale, 2);

			[
				$file,
				$parsedLine,
			] = $this->parseLine($line, $locale);

			$output = $this->language[$locale][$file][$parsedLine] ?? null;
		}

		// if still not found, try English
		if (empty($output))
		{
			$this->parseLine($line, 'en');
			$output = $this->language['en'][$file][$parsedLine] ?? null;
		}

		$output = $output ?? $line;

		if (! empty($args))
		{
			$output = $this->formatMessage($output, $args);
		}

		return $output;
	}
public function getLine ( string $ line , array $ args = [ ] ) { // ignore requests with no file specified if ( ! strpos ( $ line , '.' ) ) { return $ line ; } // Parse out the file name and the actual alias. // Will load the language file and strings. [ $ file , $ parsedLine , ] = $ this -> parseLine ( $ line , $ this -> locale ) ; $ output = $ this -> language [ $ this -> locale ] [ $ file ] [ $ parsedLine ] ?? null ; if ( $ output === null && strpos ( $ this -> locale , '-' ) ) { [ $ locale ] = explode ( '-' , $ this -> locale , 2 ) ; [ $ file , $ parsedLine , ] = $ this -> parseLine ( $ line , $ locale ) ; $ output = $ this -> language [ $ locale ] [ $ file ] [ $ parsedLine ] ?? null ; } // if still not found, try English if ( empty ( $ output ) ) { $ this -> parseLine ( $ line , 'en' ) ; $ output = $ this -> language [ 'en' ] [ $ file ] [ $ parsedLine ] ?? null ; } $ output = $ output ?? $ line ; if ( ! empty ( $ args ) ) { $ output = $ this -> formatMessage ( $ output , $ args ) ; } return $ output ; }
Parses the language string for a file, loads the file, if necessary,
getting the line.

@param string $line Line.
@param array  $args Arguments.

@return string|string[] Returns line.
Parses the language string for a file loads the file if necessary getting the line .