Pregunta

I am in need of localizing some strings for my website. I have all the necessary files in the fileadmin folder (I am not developing an extension). I managed to localize inside my Fluid template using locallang.xml like this

<f:translate id="LLL:fileadmin/Resources/Private/Language/locallang.xml:hide-menu" />

with all the languages inside one file. I did not manage to make it work simply by

<f:translate id="hide-menu" />

Now I want to migrate to the newer way of XLIFF. The location remains the same, the resource files are

locallang.xlf
cs.locallang.xlf

When used in Fluid like this

<f:translate id="LLL:fileadmin/Resources/Private/Language/locallang.xlf:hide-menu" />

it only uses the default (explicitly named) file and not the translated one. Where am I supposed to put the files and how am I supposed to use them in a Fluid template, preferably using only the id, not the whole path?

¿Fue útil?

Solución

I recommend to move your templates and locallang files (and TS and all the basic stuff) to an extension. There is currently an unresolved (status under review) bug, regarding your problem. You can read more here and here. So if you dont have good reason to keep everything in fileadmin, going to an extension is my advice, since its considered to be better practice anyway.

If you have to keep everything in fileadmin switch back to xml until the issue is fixed, wich hopefully will be the case in 6.2 ...

I'm sorry to cant be of better help.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top