core-bundle/src/Config/Loader/XliffFileLoader.php
private function getStringRepresentation(array $chunks, $value): string
    {
        switch (\count($chunks)) {
            case 2:
                return sprintf(
                    "\$GLOBALS['TL_LANG']['%s'][%s] = %s;\n",
                    $chunks[0],
                    $this->quoteKey($chunks[1]),
                    $this->quoteValue($value)
                );

            case 3:
                return sprintf(
                    "\$GLOBALS['TL_LANG']['%s'][%s][%s] = %s;\n",
                    $chunks[0],
                    $this->quoteKey($chunks[1]),
                    $this->quoteKey($chunks[2]),
                    $this->quoteValue($value)
                );

            case 4:
                return sprintf(
                    "\$GLOBALS['TL_LANG']['%s'][%s][%s][%s] = %s;\n",
                    $chunks[0],
                    $this->quoteKey($chunks[1]),
                    $this->quoteKey($chunks[2]),
                    $this->quoteKey($chunks[3]),
                    $this->quoteValue($value)
                );
        }

        throw new \OutOfBoundsException('Cannot load less than 2 or more than 4 levels in XLIFF language files.');
    }
private function getStringRepresentation(array $chunks, $value): string
    {
        switch (\count($chunks)) {
            case 2:
                return sprintf(
                    "\$GLOBALS['TL_LANG']['%s'][%s] = %s;\n",
                    $chunks[0],
                    $this->quoteKey($chunks[1]),
                    $this->quoteValue($value)
                );

            case 3:
                return sprintf(
                    "\$GLOBALS['TL_LANG']['%s'][%s][%s] = %s;\n",
                    $chunks[0],
                    $this->quoteKey($chunks[1]),
                    $this->quoteKey($chunks[2]),
                    $this->quoteValue($value)
                );

            case 4:
                return sprintf(
                    "\$GLOBALS['TL_LANG']['%s'][%s][%s][%s] = %s;\n",
                    $chunks[0],
                    $this->quoteKey($chunks[1]),
                    $this->quoteKey($chunks[2]),
                    $this->quoteKey($chunks[3]),
                    $this->quoteValue($value)
                );
        }

        throw new \OutOfBoundsException('Cannot load less than 2 or more than 4 levels in XLIFF language files.');
    }
private function getStringRepresentation ( array $ chunks , $ value ) : string { switch ( \ count ( $ chunks ) ) { case 2 : return sprintf ( "\$GLOBALS['TL_LANG']['%s'][%s] = %s;\n" , $ chunks [ 0 ] , $ this -> quoteKey ( $ chunks [ 1 ] ) , $ this -> quoteValue ( $ value ) ) ; case 3 : return sprintf ( "\$GLOBALS['TL_LANG']['%s'][%s][%s] = %s;\n" , $ chunks [ 0 ] , $ this -> quoteKey ( $ chunks [ 1 ] ) , $ this -> quoteKey ( $ chunks [ 2 ] ) , $ this -> quoteValue ( $ value ) ) ; case 4 : return sprintf ( "\$GLOBALS['TL_LANG']['%s'][%s][%s][%s] = %s;\n" , $ chunks [ 0 ] , $ this -> quoteKey ( $ chunks [ 1 ] ) , $ this -> quoteKey ( $ chunks [ 2 ] ) , $ this -> quoteKey ( $ chunks [ 3 ] ) , $ this -> quoteValue ( $ value ) ) ; } throw new \ OutOfBoundsException ( 'Cannot load less than 2 or more than 4 levels in XLIFF language files.' ) ; }
Returns a string representation of the global PHP language array.

@throws \OutOfBoundsException
Returns a string representation of the global PHP language array .