function devel_generate_set_language

1 call to devel_generate_set_language()
devel_generate_content_add_node in devel_generate/devel_generate.inc
Create one node. Used by both batch and non-batch code branches.

File

devel_generate/devel_generate.inc, line 700

Code

function devel_generate_set_language($results, $object) {
    if (isset($results['add_language'])) {
        $languages = $results['add_language'];
        $object->language = $languages[array_rand($languages)];
    }
    else {
        $default = language_default('language');
        $object->language = $default == 'en' ? LANGUAGE_NONE : $default;
    }
}