简体   繁体   中英

TYPO3 backend module: Fluid view language

I am using EXT:cart in my TYPO3 project and building an backend module to create orders from backend. So I am creating the cart object, creating the order object, defining everything that is needed to create the order within backend module. After that some finishers of EXT:cart are used to send the mail, create the invoice, clear the cart and so on – some of these finishers I run also on the backend module after saving the order. Eg the create PDF invoice finisher and the send mail finisher (to the buyers email address). But this email is in english. How can I define which language get used in the instantiated FE fluid view when fired from a backend module? It's loading the plugins TS Settings but they have nothing to with the used language for sure. The email fluid views get loaded with TYPO3\\CMS\\Fluid\\View\\StandaloneView .

How can I define the used language in fluid views loaded in backend modules / scheduler tasks?

In FE TYPO3\\CMS\\Fluid\\View\\StandaloneView seems to render in the correct language.

I didn't understand your problem exaclty, but I'm using typo3 with another language than english, what I do is in the folder My_ext\\Resources\\Private\\Language\\locallang.php, I do the translation for all the labels twice, first one for the english version, and the second for the wanted labguage In fact it's the same code, but the simple difference is in the beginning:

    <file source-language="en" datatype="plaintext" ..."the whole code" </file>

"en is for the english language"

So for the other we repeate the same line but with changing the "en"

<file source-language="de" datatype="plaintext" ..."the whole code" </file>

I don't know if my answer is helpfull, but hope it will be the case

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM