[TYPO3-dev] pi_getLL doesn't get the right translation

bernd wilke t3ng at bernd-wilke.net
Fri Jun 27 08:48:25 CEST 2014


Am 25.06.14 14:44, schrieb Plamen Petkov:
> Hi
>
> I haven't worked with old styled pibase extensions, I just started with new
> extbase, but my friend asked me for help.
>
> Lately his site is upgraded from version 4.4 to 4.5 and a private extension
> stopped working properly with languages.
>
> Problem is only with the extension.
>
> I saw that locallang.xml of the extension has translations
>
> TS includes
>
> config.sys_language_uid and config.language for all the language
>
> But pi_getLL doesn't get the right translation, it shows only one
> translation, although it is not the default.
>
> If I remove this translation from locallang.xml, it shows the default
> language, but again only one language translation.

1. multiple languages in one file are possible in 4.5!
no need for further files in typo3conf/l10n/

2. you may differ between 'default' language in language file and in TYPO3:
in languagefile 'default' always means 'english', no abbrevieation 'en' 
is understand

in your TYPO3 'default' (sys_language_uid = 0) can be any language. it 
is mapped to the existing languages in the language-file(s)

e.g.
if you configured your TYPO3 to use german as default-language and 
french as second (L=1) your language file needs three languages:
'default', 'de' and 'fr'
you may put german content in 'default' and in this case it may work, 
but if you use 'english' as third language you will get chaos:
you may insert 'en' into the language file, but it will not be recognized.
TYPO3 - language file
'default' -> 'de' (as this does not exist it will fallback to 'default' 
(where german content is returned)
'fr' -> 'fr'
'en' -> 'default' (with german content)
nothing will access 'en' in language file


3. pi_getLL can only read from one language file. pi_based extensions 
usually (generated by ext:kickstarter) use multiple language files!

4. you always can override any keydefinition by typoscript. This is 
neccessary otherwise you need to change any TER extension, which should 
be avoided for update possibilities.

bernd
-- 
http://www.pi-phi.de/cheatsheet.html



More information about the TYPO3-dev mailing list