The 'right' way to do this is demonstrated by lib/pluginlib.php. E.g.
if (get_string_manager()->string_exists('type_' . $type . '_plural', 'core_plugin')) {
// for most plugin types, their names are defined in core_plugin lang file
return get_string('type_' . $type . '_plural', 'core_plugin');
} else ...