[TYPO3-dev] Can I use $GLOBALS['LANG'] in JavaScript?

Peter Klein peter at umloud.dk
Tue Jun 30 16:12:44 CEST 2009


Hi Christopher.

For one of my older extensions (PMK Textarea -
http://typo3.org/extensions/repository/view/pmktextarea/current/)
which is 99% javascript based, I wrote a Javascript function that can
read/use TYPO3's XML language files directly from Javascript.

If you download the above extension and look at the file
"pmk_textarea.js" , then the langloaded is defined in line 1137- 

--
Peter Klein / Umloud Untd.


On Mon, 29 Jun 2009 21:59:27 +0200, "Christopher Stelmaszyk"
<christopher at yahoo.de> wrote:

>Hi guys,
>
>I want to use a language-label in a JavaScript-file.
>
>The question is: How can I do that?
>
>To make it more clear:
>Have a look at typo3/sysext/t3editor/jslib/t3editor.js.
>In line 233 (current trunk) you see that a string ("lines") is added behind 
>some dynamic content.
>
>I already had a look at some other extensions (rtehtmlarea, opendocs), but 
>they include the labels in php-files.
>
>What has to be done to get this text from a locallang-file?
>
>Kind regards
>
>Christopher 
>




More information about the TYPO3-dev mailing list