[Typo3-dev] pls. help: locallang_general.xml vs. locallang_general.php

mario chiari.hm at flashnet.it
Thu Oct 27 14:15:06 CEST 2005


Dear dev,

I am trying to develop my first typo3 ext (really, to combine a couple
of extant extensions).

On a point I am trying to use something I read on this list (see below
1), but I get an error msg (see below 2). I am unable to find something
which helps me within the archives.

Thanks a lot for any advise.
mario

1//

Am Wed, 27 Apr 2005 19:28:25 +0200 (CEST) schrieb Arco:

> [somebody] Is there a default list of translations in typo3?


yes, I guess you mean something like
typo3/sysext/lang/locallang_general.xml

you can acces them f.e. in your tca.php files like

'starttime' => Array (
	'exclude' => 1,	
	'l10n_mode' => 'mergeIfNotBlank',
-->	'label' => 'LLL:EXT:lang/locallang_general.php:LGL.starttime',
	'config' => Array (
		'type' => 'input',
		'size' => '10',
		'max' => '20',
		'eval' => 'datetime',
		'checkbox' => '0',
		'default' => '0'
	)
)


2// If I do something along the lines above, I get the following error
msg.

Warning:
getllfromstring(/usr/local/typo3/htdocs/testsite-3.8.0/typo3/sysext/lang/locallang_general.php): failed to open stream: No such file or directory in /usr/local/typo3/htdocs/testsite-3.8.0/typo3conf/ext/EXTNAME/pi1/class.tx_EXTNAME_pi1.php on line 924

Warning: getllfromstring(): Failed opening
'/usr/local/typo3/htdocs/testsite-3.8.0/typo3/sysext/lang/locallang_general.php' for inclusion (include_path='.:/usr/local/typo3/lib/php') in /usr/local/typo3/htdocs/testsite-3.8.0/typo3conf/ext/EXTNAME/pi1/class.tx_EXTNAME_pi1.php on line 924

3// getllfromstring is:

	function getLLFromString($string) {
		global $LOCAL_LANG;
		$arr = explode(':',$string);
		if($arr[0] == 'LLL' && $arr[1] == 'EXT') {
			$names = explode('/',$arr[2]);
			if(sizeof($names) == 2) {
				include(t3lib_extMgm::extPath($names[0]).$names[1]);
				$this->LOCAL_LANG =
t3lib_div::array_merge_recursive_overrule($this->LOCAL_LANG,$LOCAL_LANG);
				return $this->pi_getLL($arr[3]);
			}
		}
	}








More information about the TYPO3-dev mailing list