Translation/Exporter/YamlExporter.php
protected function createMultiArray(array $translations)
    {
        $res = array();

        foreach ($translations as $keyString => $value) {
            $keys = explode('.', $keyString);

            //$keyString might be "Hello world."
            $keyLength = count($keys);
            if ($keys[$keyLength - 1] == '') {
                unset($keys[$keyLength - 1]);
                $keys[$keyLength - 2] .= '.';
            }

            $this->addValueToMultiArray($res, $value, $keys);
        }

        return $res;
    }
protected function createMultiArray(array $translations)
    {
        $res = array();

        foreach ($translations as $keyString => $value) {
            $keys = explode('.', $keyString);

            //$keyString might be "Hello world."
            $keyLength = count($keys);
            if ($keys[$keyLength - 1] == '') {
                unset($keys[$keyLength - 1]);
                $keys[$keyLength - 2] .= '.';
            }

            $this->addValueToMultiArray($res, $value, $keys);
        }

        return $res;
    }
protected function createMultiArray ( array $ translations ) { $ res = array ( ) ; foreach ( $ translations as $ keyString => $ value ) { $ keys = explode ( '.' , $ keyString ) ; //$keyString might be "Hello world." $ keyLength = count ( $ keys ) ; if ( $ keys [ $ keyLength - 1 ] == '' ) { unset ( $ keys [ $ keyLength - 1 ] ) ; $ keys [ $ keyLength - 2 ] .= '.' ; } $ this -> addValueToMultiArray ( $ res , $ value , $ keys ) ; } return $ res ; }
Create a multi dimension array.

If you got a array like array('foo.bar.baz'=>'foobar') we will create an array like:
array('foo'=>array('bar'=>array('baz'=>'foobar')))

@param array $translations

@return array
Create a multi dimension array .