private function getStringRepresentation(array $chunks, $value)
{
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.');
}