diff --git a/lang/en/role.php b/lang/en/role.php
index 971722c..bfb3ac4 100644
--- a/lang/en/role.php
+++ b/lang/en/role.php
@@ -300,6 +300,14 @@ $string['role:assign'] = 'Assign roles to users';
 $string['roleassignments'] = 'Role assignments';
 $string['roledefinitions'] = 'Role definitions';
 $string['rolefullname'] = 'Role name';
+$string['rolename:coursecreator'] = 'Course creator';
+$string['rolename:editingteacher'] = 'Teacher';
+$string['rolename:frontpage'] = $string['frontpageuser'];
+$string['rolename:guest'] = 'Guest';
+$string['rolename:manager'] = $string['manager'];
+$string['rolename:student'] = 'Student';
+$string['rolename:teacher'] = 'Non-editing teacher';
+$string['rolename:user'] = 'Authenticated user';
 $string['role:manage'] = 'Create and manage roles';
 $string['role:override'] = 'Override permissions for others';
 $string['role:review'] = 'Review permissions for others';
diff --git a/lib/accesslib.php b/lib/accesslib.php
index dd7f5b0..a090110 100644
--- a/lib/accesslib.php
+++ b/lib/accesslib.php
@@ -4099,20 +4099,30 @@ function role_get_name($role, context_course $coursecontext) {
  * @return array Array of context-specific role names, or role objexts with a ->localname field added.
  */
 function role_fix_names($roleoptions, context $context, $rolenamedisplay = ROLENAME_ALIAS) {
-    global $DB;
+    global $DB, $CFG, $USER;    // System configuration and user info are required to make the proper translation
 
     // Make sure we have a course context.
     $coursecontext = $context->get_course_context(false);
 
+    // MDL-33970 - Role names optionally translated from the language packs if available.
     // Make sure we are working with an array roleid => name. Normally we
-    // want to use the unlocalised name if the localised one is not present.
+    // want to use the localized name, or the translated name, or even the
+    // unlocalised name as the last alternative, in that order.
+    // New rolename string definitions would be in the format: 'rolename:<ROLE_SHORTNAME>' @ /lang/<LANG>/role.php
     $newnames = array();
     foreach ($roleoptions as $rid => $roleorname) {
         if ($rolenamedisplay != ROLENAME_ALIAS_RAW) {
             if (is_object($roleorname)) {
-                $newnames[$rid] = $roleorname->name;
+                // try to load the translated role name
+                get_string_manager()->string_exists('rolename:'.$roleorname->shortname, 'role') ?   // string exists?
+                        $newnames[$rid] = get_string('rolename:'.$roleorname->shortname, 'role') :  // load it if true
+                        $newnames[$rid] = $roleorname->name;                                        // keep database value for now
             } else {
-                $newnames[$rid] = $roleorname;
+                // load role shortname to try to load the translated role name
+                $role_shortname = $DB->get_field('role', 'shortname', array('id'=>$rid));
+                get_string_manager()->string_exists('rolename:'.$role_shortname, 'role') ?          // string exists?
+                        $newnames[$rid] = get_string('rolename:'.$role_shortname, 'role') :         // load it if true
+                        $newnames[$rid] = $roleorname;                                              // keep database value for now
             }
         } else {
             $newnames[$rid] = '';
@@ -4141,8 +4151,22 @@ function role_fix_names($roleoptions, context $context, $rolenamedisplay = ROLEN
         }
         if (is_object($roleorname)) {
             $roleoptions[$rid]->localname = $newnames[$rid];
+            // MDL-33970 - Role names optionally translated from the language packs if available.
+            // try to load the translated role name
+            get_string_manager()->string_exists('rolename:'.$roleorname->shortname, 'role') ?           // string exists?
+                    $roleoptions[$rid]->name = get_string('rolename:'.$roleorname->shortname, 'role') : // load it if true
+                    NULL;                                                                               // keep database value as loaded before
         } else {
-            $roleoptions[$rid] = $newnames[$rid];
+            // MDL-33970 - Role names optionally translated from the language packs if available.
+            if (isset($newnames[$rid])) {                   // if local course translations loaded, keep them
+                $roleoptions[$rid] = $newnames[$rid];
+            } else {                                        // try to update with language trabslations if available
+                // load role shortname to try to load the translated role name
+                $role_shortname = $DB->get_field('role', 'shortname', array('id'=>$rid));
+                get_string_manager()->string_exists('rolename:'.$role_shortname, 'role') ?      // string exists?
+                        $roleoptions[$rid] = get_string('rolename:'.$role_shortname, 'role') :  // load it if true
+                        NULL;                                                                   // keep database value as loaded before
+            }
         }
     }
     return $roleoptions;
