WordPress at a glance
function is not described

translate_level_to_role() WP 2.0.0

Translate user level to user role name.

No Hooks.

Return

String. User role name.

Usage

translate_level_to_role( $level );
$level(int) (required)
User level.

Code of translate level to role: wp-admin/includes/upgrade.php WP 5.2.1

<?php
function translate_level_to_role( $level ) {
	switch ( $level ) {
		case 10:
		case 9:
		case 8:
			return 'administrator';
		case 7:
		case 6:
		case 5:
			return 'editor';
		case 4:
		case 3:
		case 2:
			return 'author';
		case 1:
			return 'contributor';
		case 0:
			return 'subscriber';
	}
}