Forums / Setup & design / i18n.ini.append.php for each siteaccess

i18n.ini.append.php for each siteaccess

Author Message

Pierandrea Della Putta

Thursday 04 September 2008 5:54:06 am

Hi to all. I found a way to have i18n.ini for each siteaccess. To make it, you mast hack to index.php. In the function "eZUpdateTextCodecSettings()", comment or delete "$ini =& eZINI::instance( 'i18n.ini' );" and write:

include_once( "lib/ezutils/classes/ezuri.php" );
include_once( "lib/ezutils/classes/ezsys.php" );
include_once( "access.php" );

$ini =& eZINI::instance();

eZSys::init( 'index.php', $ini->variable( 'SiteAccessSettings', 'ForceVirtualHost' ) == 'true' );

$uri =& eZURI::instance( eZSys::requestURI() );

$access = accessType( $uri,
eZSys::hostname(),
eZSys::serverPort(),
eZSys::indexFile() );
$site_access = $access['name'];
//DEBUG
//echo "<br>settings/siteaccess/$site_access/<br>";

$ini =& eZINI::instance( 'i18n.ini', "settings/siteaccess/$site_access/", null, null, null, true, true);

This read i18n.ini.append.php from siteaccess. I this way you can have i site in Latin and UTF-8 charset.

Sorry for my English