Following are hacks I needed to add so i18n works on IIS. IIS soooo sucks, but what can I do when my customer uses it. This method is in sapphire/core/i18n.php file:
protected static function get_owner_module($name) {
if (substr($name,-3) == '.ss') {
global $_TEMPLATE_MANIFEST;
$path = current($_TEMPLATE_MANIFEST[substr($name,0,-3)]);
// hacks for IIS -->
$path = str_replace('\\sapphire/..', '', $path);
$path = str_replace('C:', '', $path);
$path = str_replace('\\', '/', $path);
$bf = Director::baseFolder();
$bf = str_replace('C:', '', $bf);
$bf = str_replace('\\', '/', $bf);
// <--
ereg($bf . '/([^/]+)/',$path,$module);
} else {
global $_CLASS_MANIFEST;
$path = $_CLASS_MANIFEST[$name];
// hacks for IIS -->
$path = str_replace('\\sapphire/..', '', $path);
$path = str_replace('C:', '', $path);
$path = str_replace('\\', '/', $path);
$bf = Director::baseFolder();
$bf = str_replace('C:', '', $bf);
$bf = str_replace('\\', '/', $bf);
// <--
ereg($bf . '/([^/]+)/',$path,$module);
}
return $module[1];
}
I've written it in multiple lines so it's obvious what the fix does.