[TYPO3-mvc] [SPAM FortiMail] Re: eID and Translations

Jonas Eberle jonas.eberle at d-mind.de
Tue Nov 4 15:06:19 CET 2014


Absolutely great read! For all those that already burnt in Typo3-AJAX-hell.
> http://typo3.helmut-hummel.de/post/90365109335/out-of-bound-typoscript-rendering

Cheers, Jonas

>
>
>
> ----------------------------
> Citrix Solution Seminar am 27. November 2014
> Machen Sie Ihre Infrastruktur mit Citrix Networking-Lösungen fit für die Zukunft. http://it-training.netlogix.de/leistungen-angebote/events/citrix-solution-seminar-2014
>
> netlogix-Sicherheitscheck: mit Sicherheit mehr Sicherheit im Netzwerk!
> Gewinnen Sie einen halben Tag mit unserem Sicherheitsexperten. http://www.netlogix.de/sicherheitscheck
> ----------------------------
>
>
>
>
> netlogix GmbH & Co. KG
> IT-Services | IT-Training | Media
> Neuwieder Straße 10 | 90411 Nürnberg
> Telefon: +49 (911) 539909 - 0 | Fax: +49 (911) 539909 - 99
> E-Mail: info at netlogix.de | Internet: http://www.netlogix.de
>
> netlogix GmbH & Co. KG ist eingetragen am Amtsgericht Nürnberg (HRA 13338)
> Persönlich haftende Gesellschafterin: netlogix Verwaltungs GmbH (HRB 20634)
> Umsatzsteuer-Identifikationsnummer: DE 233472254
> Geschäftsführer: Stefan Buchta, Matthias Schmidt
>
>
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Chris Wolff - AERTiCKET AG
> Gesendet: Mittwoch, 29. Oktober 2014 09:31
> An: TYPO3 v4 MVC project
> Betreff: Re: [TYPO3-mvc] [SPAM FortiMail] Re: eID and Translations
>
> Hi,
> the Language configuration is done in Typoscript Setup therefore you need to initalize the Typoscript setup for a given Page.
> But i this would take a lot of time. I would rather send another parameter along the ajax request with the language key
>
> AJAX URL : ?eID=tx_myext&key=my_key_for_translation&lang=de
>
> *** PHP **'
> $lang = substr($lang,0,2); // shortening the given language code to 2 chars as this is what typo3 uses.
> // make shure wie have a a string that looks like a language code. (eg letters only lowercase) If(!preg_match('^[a-z]{2}$ ',$lang ){die('invalid language'); tslib_eidtools::initLanguage($lang);
>
> *** /php ***
>
> this would eleminate the case statment. And it would be future proof as all typo3 languages are supported.
>
> Now your javascript frontend needs to now which language it runs in.
> But this should be easy to get. As you send this information already along in the html tag as lang attribute.
>
> <html lang="de_DE" />
>
> Regards chris
>
>
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von g4-lisz at tonarchiv.ch
> Gesendet: Dienstag, 28. Oktober 2014 19:06
> An: Gion Koch; TYPO3 v4 MVC project
> Betreff: [SPAM FortiMail] Re: [TYPO3-mvc] eID and Translations
>
> On 10/28/2014 05:29 PM, Gion Koch wrote:
>> Greetings,
>>
>>
>> Currently I'm stuck with getting a translated message from an Ajax
>> Request via eID. Everything works as it should, but not the
>> translation part.
>> I stumbled already several times over this issue.
>> As a workaround I used an ugly hack:
>> - including the sys_language_uid as hidden field
>> - send it along with every ajax call
>> - having a translation key for the default language with the
>> sys_language_uid for every language as last part of the key. i.E.
>> translation.key.0
>>
>> I would be eager to know, if there is clean way for handling this issue.
>>
>>
>> Greetings
>> Gion
>>
> Same here... I couldn't find an elegant solution. We get the "lang" from the session:
>
>
>      $lang = $TSFE->getKey("ses", "lang");
>      switch($lang) {
>          case 0: tslib_eidtools::initLanguage('de'); break;
>          case 1: tslib_eidtools::initLanguage('fr'); break;
>          case 2: tslib_eidtools::initLanguage('it'); break;
>          default: tslib_eidtools::initLanguage('de');
>      }
>      $GLOBALS['LANG']->includeLLFile(PATH_site .
> 'typo3conf/ext/hplusinfo/Resources/Private/Language/locallang.xml');
>
>   $txt_more = $GLOBALS['LANG']->getLL('fe_search.showmore_txt')
>
>
> Cheers,
> Till
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc


-- 
Neu: Portal Region Stuttgart - www.region-stuttgart.de
Neu: emobil-in-bw.de
Neukunde: Statistisches Landesamt BaWü
--------------------------------
d-mind bei Facebook: http://www.facebook.com/werbeagentur.internetagentur.stuttgart
--------------------------------
d-mind
Fuchs/Weiß/Strobel GbR
Mörikestraße 69
70199 Stuttgart
Tel.: +49 711 280481-1 (Durchwahl: -18)
Fax: +49 711 2804813
Inhaber: Jens Fuchs, Michael Weiß, Jens Strobel
www.d-mind.de



More information about the TYPO3-project-typo3v4mvc mailing list