[TYPO3-dev] JavaScript files and missing localization

Tapio Markula tapio.markula at atwebteam.com
Mon Apr 16 13:45:01 CEST 2007


Martin Kutschker kirjoitti:
> Tapio Markula schrieb:
>> Hi
>>
>> JavaScript files don't have localization system.
>> Every text inside external JS doesn't have translation,
>> for example jsfunc.validateform.js
> 
> The form validation function is localized via it's paremeters.
> 
> Masi

The problem is that it should be localized in general - without
needed to create a plugin for that.


And that doesn't work.
Typo3 has
$GLOBALS['TSFE']->additionalHeaderData['JSFormValidate'] = '<script 
type="text/javascript" 
src="'.$GLOBALS['TSFE']->absRefPrefix.'t3lib/jsfunc.validateform.js"></script>';


you *can't* send any parameter to the linked JS-file!

I must use TypoScript to recreate necessary function

page.1=TEXT
page.1.value(
<script type="text/javascript">

function validateForm(theFormname,theFieldlist,goodMess,badMess,emailMess)	{

...

theBadMess = "{$fillInformation}:";




More information about the TYPO3-dev mailing list