'translation' => 'Datei herunterladen, ausführen und Bot deinstallieren',
'fields' => array(
'url' => 'Download-Link'
)
)
),
'status' => array(
'1' => 'Aktiviert',
'0' => 'Deaktiviert'
)
);
My config at modules/tasks/config/config.php:
<?php
return array(
'always_load' => array(
'classes' => array(
'tasks'
),
'config' => array(
'possible_tasks'
),
'language' => array(
'tasks'
)
),
);
I know that i ask very much today, but i dont understand the Module-System ;-) FuelPHP is excelent documented but the Module system is a little bit "bad" documented.. Hope you can help me!
This is related to your other question, where I said you should not call classes directly.
Modules operate in what is called a module context. This context is set automatically when the router determines you are calling a module controller, either via the browser or API (the main request), or via a HMVC request. A context is what allows a module controller to find local assets like config, lang, views, etc.
If you just do a class load across namespace, the framework has no clue you're switching contexts, it is not involved in the calling process.
Cross-module usage is considered very bad practice, not done, and it doesn't work (without quite a bit of hacking). And therefore not documented. It is in direct contradiction with the design philosophy of loose coupling. The fact that the autoloader is able to load the class doesn't mean that it (from a framework point of view) will work.
If you need to access a module (or another module), the only proper way to do that is using an HMVC request.
if you're in a module controller, and this controller is called either by a main Request or an HMVC Request, then loading a language file from that same module just works.
So, where you do you the \Lang::load() call, and how did you get there?