I have a standalone file that generates an image, i included joomla framework. This file is displayed as image on the page. $\_SESSION is empty and getUser returns NULL.
The JText does not know what module.language file to load and whats the default language for the user. How do I access this info/objects? 

My code:

```
//define constant
define( '_JEXEC', 1 );
define( 'DS', DIRECTORY_SEPARATOR ); 

//joomla installation
define( 'JPATH_BASE', '../..' );

//include joomla core files
require_once( JPATH_BASE . DS . 'includes' . DS . 'defines.php' );
require_once( JPATH_BASE . DS . 'includes' . DS . 'framework.php' );
require_once( JPATH_BASE . DS . 'libraries' . DS . 'joomla' . DS . 'factory.php' );

$echo = JText::_("MOD_MYMODULE_TEXT");

header("Content-type: image/png");
Graph::render($echo);

```