[TYPO3-project-formidable] renderlet TinyMCE: use page language instead of one fixed (configurated) language
Hauke Hain
newgrp at googlemail.com
Thu Mar 5 21:18:22 CET 2009
Hi Jerome,
that is a very handy feature! Thank you very much, it is great.
Now I have to check, if it works, but at the moment I get no output of
Formidable with the latest SV version.
I'll check what the reason is...
Regards,
Hauke
"Jerome Schneider" <typo3dev at ameos.com> schrieb im Newsbeitrag
news:mailman.1.1235998456.5919.typo3-project-formidable at lists.netfielders.de...
> Hi Hauke,
>
> I see your point. To make of this a more generic feature, I implemented
> the TS: notation. Value prefixed by TS: are evaluated by Formidable as
> pointers in the typoscript template.
>
> So, in your case, you might define:
>
> <renderlet:TINYMCE name="reviewText" label="LLL:reviewForm.review">
> <config
> width="500"
> height="200"
> language="TS:config.htmlTag_langKey"
> />
> </renderlet:TINYMCE>
>
>
> The TS:... notation is available on (almost) every property you might
> define in your XML.
>
> So that:
>
> <renderlet:TEXT name="mytxt" label="TS:config.mytxt.label" />
>
> would work.
>
>
> I implemented this and it will be available in the upcoming revision (will
> be 2.0.323)
>
> Best regards,
> Jerome
>
>
> Hauke Hain a écrit :
>> Hello,
>>
>> because I do not know if it is possible to make conditions within the
>> XML, but wanted the language of the editor the same as the page language,
>> I made a few adjustments.
>>
>> In your page TypoScript template you must have some code like this:
>> [globalVar = GP:L=0]
>> config {
>> sys_language_uid = 0
>> language = en
>> locale_all = en_GB
>> htmlTag_langKey = en
>> }
>> plugin.meta.language = en
>>
>> [global] [globalVar = GP:L=1]
>> config {
>> sys_language_uid = 1
>> language = de
>> locale_all = de_DE
>> htmlTag_langKey = de
>> }
>> plugin.meta.language = de
>> [global]
>>
>> Important is, that the language is set to the same code as TinyMCE likes
>> it.
>>
>>
>> In your XML just set the language to siteSetting:
>> <renderlet:TINYMCE name="reviewText" label="LLL:reviewForm.review">
>> <config
>> width="500"
>> height="200"
>> language="siteSetting"
>> />
>> </renderlet:TINYMCE>
>>
>>
>> Now add to your
>> ameos_formidable\api\base\rdt_tinymce\api\class.tx_rdttinymce.php
>> the following lines before
>> if(is_array($aAddConfig = $this->_navConf("/addconfig")) &&
>> $this->oForm->isRunneable($aAddConfig)) {
>> // etc...
>> }
>>
>>
>> add these:
>> if(array_key_exists("language", $aConfig)) {
>> if ($aConfig["language"] = 'siteSetting') {
>> $aConfig["language"] =
>> ($GLOBALS['TSFE']->tmpl->setup['config.']['language']);
>> }
>> }
>>
>>
>>
>>
>> If you change this line
>> $aConfig["language"] =
>> ($GLOBALS['TSFE']->tmpl->setup['config.']['language']);
>> to
>> $aConfig["language"] =
>> ($GLOBALS['TSFE']->tmpl->setup['config.'][htmlTag_langKey]);
>> You read the htmlTag_langKey set in your TypoScript Template instead of
>> language also set in your TS Template.
>>
>>
>> I dunno, I'd like to see this functionality in the next formidable
>> version. :)
>>
>> One hint:
>> Of course you have to put all your language packs in the root folder of
>> TinyMCE. If TinyMCE doesn't find a translation something like
>> "{desc_to_translate}" will be shown.
>>
>>
>> Hope it's useful!
>>
>> Regards,
>> Hauke
More information about the TYPO3-project-formidable
mailing list