protected function writeLocale($locale, array $lines = [])
    {
        $translations = ConvertToTree::fromFlattened($lines);

        foreach ($translations as $section => $trans) {
            $this->filesystem->put(
                $locale.'/'.$section.'.php',
                "<?php\n\n return ".var_export($trans, true).";\n"
            );
        }
    }
protected function writeLocale($locale, array $lines = [])
    {
        $translations = ConvertToTree::fromFlattened($lines);

        foreach ($translations as $section => $trans) {
            $this->filesystem->put(
                $locale.'/'.$section.'.php',
                "<?php\n\n return ".var_export($trans, true).";\n"
            );
        }
    }
protected function writeLocale ( $ locale , array $ lines = [ ] ) { $ translations = ConvertToTree :: fromFlattened ( $ lines ) ; foreach ( $ translations as $ section => $ trans ) { $ this -> filesystem -> put ( $ locale . '/' . $ section . '.php' , "<?php\n\n return " . var_export ( $ trans , true ) . ";\n" ) ; } }
Create new cached translation files based on database entries

@param $locale
@param array $lines - flat array of key-value pairs e.g. foo.bar => 'translation of foo'
Create new cached translation files based on database entries