
Oliver Tappe (ot@otrs.com) wrote:
Ah, you are right of course. I was not precise enough - what I should have been saying is that OTRS always loads all Language modules matching the current language. So if the user is currently surfing the FAQ-module in German, the de_* files for all other modules would be loaded, too, even if they are not used at all by the current HTTP-request.
How are you going to tell Kernel::Language which language subset you need for the current request? Kernel::Language is instanced from Kernel::Output::HTML::Layout. So either Kernel::Language evaluates the current action parameter, or the frontend modules in Kernel/Modules/ provide each call of LayoutObject->Output() with that extra information.
The actual .pm-loading is cached by ModPerl, but not the invocation of Data(), so the copying of the translation still takes place for every request - or am I missing something?
Yes, you are right. But I think loading a .pm is more costly then calling Data(). With Apache/mod_perl, one could load a global language data hash by using the PerlRequire statement (yep, optimization always breaks flexibility). Regards, Felix