original_string: public static function llXmlAutoFileName($fileRef, $language, $sameLocation = FALSE) {
  		if ($sameLocation) {
  			$location = 'EXT:';
  		} else {
  			$location = 'typo3conf/l10n/' . $language . '/'; // Default location of translations
  		}
  
  			// Analyse file reference:
  		if (self::isFirstPartOfStr($fileRef, PATH_typo3 . 'sysext/')) { // Is system:
  			$validatedPrefix = PATH_typo3 . 'sysext/';
  			#$location = 'EXT:csh_'.$language.'/';	// For system extensions translations are found in "csh_*" extensions (language packs)
  		} elseif (self::isFirstPartOfStr($fileRef, PATH_typo3 . 'ext/')) { // Is global:
  			$validatedPrefix = PATH_typo3 . 'ext/';
  		} elseif (self::isFirstPartOfStr($fileRef, PATH_typo3conf . 'ext/')) { // Is local:
  			$validatedPrefix = PATH_typo3conf . 'ext/';
  		} elseif (self::isFirstPartOfStr($fileRef, PATH_site . 'typo3_src/tests/')) { // Is test:
  			$validatedPrefix = PATH_site . 'typo3_src/tests/';
  			$location = $validatedPrefix;
  		} else {
  			$validatedPrefix = '';
  		}
  
  		if ($validatedPrefix) {
  
  				// Divide file reference into extension key, directory (if any) and base name:
  			list($file_extKey, $file_extPath) = explode('/', substr($fileRef, strlen($validatedPrefix)), 2);
  			$temp = self::revExplode('/', $file_extPath, 2);
  			if (count($temp) == 1) {
  				array_unshift($temp, '');
  			} // Add empty first-entry if not there.
  			list($file_extPath, $file_fileName) = $temp;
  
  				// If $fileRef is already prefix with "[language key]" then we should return it as this
  			if (substr($file_fileName, 0, strlen($language) + 1) === $language . '.') {
  				return $fileRef;
  			}
  
  				// The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it.
  			return $location .
  					$file_extKey . '/' .
  					($file_extPath ? $file_extPath . '/' : '') .
  					$language . '.' . $file_fileName;
  		} else {
  			return NULL;
  		}
  	}
code: public static function llXmlAutoFileName($fileRef, $language, $sameLocation = FALSE) {
  		if ($sameLocation) {
  			$location = 'EXT:';
  		} else {
  			$location = 'typo3conf/l10n/' . $language . '/'; // Default location of translations
  		}
  
  			// Analyse file reference:
  		if (self::isFirstPartOfStr($fileRef, PATH_typo3 . 'sysext/')) { // Is system:
  			$validatedPrefix = PATH_typo3 . 'sysext/';
  			#$location = 'EXT:csh_'.$language.'/';	// For system extensions translations are found in "csh_*" extensions (language packs)
  		} elseif (self::isFirstPartOfStr($fileRef, PATH_typo3 . 'ext/')) { // Is global:
  			$validatedPrefix = PATH_typo3 . 'ext/';
  		} elseif (self::isFirstPartOfStr($fileRef, PATH_typo3conf . 'ext/')) { // Is local:
  			$validatedPrefix = PATH_typo3conf . 'ext/';
  		} elseif (self::isFirstPartOfStr($fileRef, PATH_site . 'typo3_src/tests/')) { // Is test:
  			$validatedPrefix = PATH_site . 'typo3_src/tests/';
  			$location = $validatedPrefix;
  		} else {
  			$validatedPrefix = '';
  		}
  
  		if ($validatedPrefix) {
  
  				// Divide file reference into extension key, directory (if any) and base name:
  			list($file_extKey, $file_extPath) = explode('/', substr($fileRef, strlen($validatedPrefix)), 2);
  			$temp = self::revExplode('/', $file_extPath, 2);
  			if (count($temp) == 1) {
  				array_unshift($temp, '');
  			} // Add empty first-entry if not there.
  			list($file_extPath, $file_fileName) = $temp;
  
  				// If $fileRef is already prefix with "[language key]" then we should return it as this
  			if (substr($file_fileName, 0, strlen($language) + 1) === $language . '.') {
  				return $fileRef;
  			}
  
  				// The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it.
  			return $location .
  					$file_extKey . '/' .
  					($file_extPath ? $file_extPath . '/' : '') .
  					$language . '.' . $file_fileName;
  		} else {
  			return NULL;
  		}
  	}
code_tokens: public static function llXmlAutoFileName ( $ fileRef , $ language , $ sameLocation = FALSE ) { if ( $ sameLocation ) { $ location = 'EXT:' ; } else { $ location = 'typo3conf/l10n/' . $ language . '/' ; // Default location of translations } // Analyse file reference: if ( self :: isFirstPartOfStr ( $ fileRef , PATH_typo3 . 'sysext/' ) ) { // Is system: $ validatedPrefix = PATH_typo3 . 'sysext/' ; #$location = 'EXT:csh_'.$language.'/';	// For system extensions translations are found in "csh_*" extensions (language packs) } elseif ( self :: isFirstPartOfStr ( $ fileRef , PATH_typo3 . 'ext/' ) ) { // Is global: $ validatedPrefix = PATH_typo3 . 'ext/' ; } elseif ( self :: isFirstPartOfStr ( $ fileRef , PATH_typo3conf . 'ext/' ) ) { // Is local: $ validatedPrefix = PATH_typo3conf . 'ext/' ; } elseif ( self :: isFirstPartOfStr ( $ fileRef , PATH_site . 'typo3_src/tests/' ) ) { // Is test: $ validatedPrefix = PATH_site . 'typo3_src/tests/' ; $ location = $ validatedPrefix ; } else { $ validatedPrefix = '' ; } if ( $ validatedPrefix ) { // Divide file reference into extension key, directory (if any) and base name: list ( $ file_extKey , $ file_extPath ) = explode ( '/' , substr ( $ fileRef , strlen ( $ validatedPrefix ) ) , 2 ) ; $ temp = self :: revExplode ( '/' , $ file_extPath , 2 ) ; if ( count ( $ temp ) == 1 ) { array_unshift ( $ temp , '' ) ; } // Add empty first-entry if not there. list ( $ file_extPath , $ file_fileName ) = $ temp ; // If $fileRef is already prefix with "[language key]" then we should return it as this if ( substr ( $ file_fileName , 0 , strlen ( $ language ) + 1 ) === $ language . '.' ) { return $ fileRef ; } // The filename is prefixed with "[language key]." because it prevents the llxmltranslate tool from detecting it. return $ location . $ file_extKey . '/' . ( $ file_extPath ? $ file_extPath . '/' : '' ) . $ language . '.' . $ file_fileName ; } else { return NULL ; } }
docstring: Returns auto-filename for locallang-XML localizations.
  
  @param string $fileRef Absolute file reference to locallang-XML file. Must be inside system/global/local extension
  @param string $language Language key
  @param boolean $sameLocation if TRUE, then locallang-XML localization file name will be returned with same directory as $fileRef
  @return string Returns the filename reference for the language unless error occurred (or local mode is used) in which case it will be NULL
docstring_tokens: Returns auto - filename for locallang - XML localizations .