public static function set_locales($locales)
    {
        if (is_array($locales)) {
            $list = array();
            foreach ($locales as $locale) {
                if (i18n::validate_locale($locale)) {
                    $list[] = $locale;
                }
            }
            $list = array_unique($list);
            Config::inst()->update('TranslatableDataObject', 'locales', empty($list) ? null : $list);
        } else {
            Config::inst()->update('TranslatableDataObject', 'locales', null);
        }
    }
public static function set_locales($locales)
    {
        if (is_array($locales)) {
            $list = array();
            foreach ($locales as $locale) {
                if (i18n::validate_locale($locale)) {
                    $list[] = $locale;
                }
            }
            $list = array_unique($list);
            Config::inst()->update('TranslatableDataObject', 'locales', empty($list) ? null : $list);
        } else {
            Config::inst()->update('TranslatableDataObject', 'locales', null);
        }
    }
public static function set_locales ( $ locales ) { if ( is_array ( $ locales ) ) { $ list = array ( ) ; foreach ( $ locales as $ locale ) { if ( i18n :: validate_locale ( $ locale ) ) { $ list [ ] = $ locale ; } } $ list = array_unique ( $ list ) ; Config :: inst ( ) -> update ( 'TranslatableDataObject' , 'locales' , empty ( $ list ) ? null : $ list ) ; } else { Config :: inst ( ) -> update ( 'TranslatableDataObject' , 'locales' , null ) ; } }
Explicitly set the locales that should be translated.

@example
<code>
// Set locales to en_US and fr_FR
TranslatableDataObject::set_locales(array('en_US', 'fr_FR'));
</code>

Defaults to `null`. In this case, locales are being taken from
Translatable::get_allowed_locales or Translatable::get_existing_content_languages

@param array|null $locales an array of locales or null
@deprecated 2.0 use YAML config `locales` instead
Explicitly set the locales that should be translated .