[TYPO3] same locallang for different pi's

bernd wilke xoonsji02 at sneakemail.com
Wed Aug 27 20:44:17 CEST 2008


*grrr* I wasn't ready. wrong key. :-(
on Wed, 27 Aug 2008 18:34:56 +0000, bernd wilke wrote:

> on Wed, 27 Aug 2008 10:54:13 +0200, Lars Haendler wrote:
> 
>> Hi,
>> 
>> while working on a new extension with different pi's I realized that
>> each pi has its own locallang.xml file. Is there a way to use only on
>> locallang.xml - say from pi1 - for all pi's?
> 
> the answer with one single file is given by Xavier, I can give you a
> solution for using two locallang.php, so each plugin can have some
> specific labes and use all common labels (e.g. all that labels for
> fields also defined in the extension)
>  
>> Is there a standard locallang file that is accessible for all
>> extensions? I mean where standard phases like "Are you sure?", "Yes",
>> "No" or whatsoever can be found?
> 
> somewhere in core there should be something like that, as i remember
> some threads about unifying those labels in the whole BE.

But that was for BE! 
I don't know wether and where you can use it for FE-plugins.

now for the solution with two locallang-files:
http://www.pi-phi.de/t3v4/secondlocallang.html 
the page is in german, but you need just the first box.
It is a redefinition and extension of pi_loadLL:
first call original, then check flag for duplication include.
in case of no duplication include the second locallang-file. in this case 
it is the locallang with all labels for the database-tables and -fields.
merge arrays with order. set inclusion flag.

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


More information about the TYPO3-english mailing list