mackstar/li3_translate — Issue #2: $locales is not optional
Author: arirangz
Created: 2011-11-14 14:27:30+00:00
State: open

When we define the model, $locales should be optional. I have modify Tranlatable.php to do this with something like that :

protected static function _save($class){

$classes = static::$_classes;
$fields = static::$_configurations['fields'];
$locales = static::$_configurations['locales'];
//add support of locales of app
if ($locales == null) {
$locales_env = Environment::get('locales');
foreach ($locales_env as $key=>$value) {
$locales[] = $key;
}
}
}

Thanks!