Language switcher with country code and title
You have to copy and paste the entire theme_links function and rename it like
you did mytheme_links__locale_block

function theme_links__locale_block($vars) {
  $links = $vars['links'];
  $attributes = $vars['attributes'];
  $heading = $vars['heading'];
  global $language_url;
  $output = '';

  if (count($links) &gt; 0) {
    // Treat the heading first if it is present to prepend it to the
    // list of links.
    if (!empty($heading)) {
      if (is_string($heading)) {
        // Prepare the array that will be used when the passed heading
        // is a string.
        $heading = array(
          'text' =&gt; $heading,
          // Set the default level of the heading.
          'level' =&gt; 'h2',
        );
      }
      $output .= '&lt;' . $heading['level'];
      if (!empty($heading['class'])) {
        $output .= drupal_attributes(array('class' =&gt; $heading['class']));
      }
      $output .= '&gt;' . check_plain($heading['text']) . '&lt;/' . $heading['level'] . '&gt;';
    }

    $output .= '&lt;ul' . drupal_attributes($attributes) . '&gt;';

    $num_links = count($links);
    $i = 1;

    foreach ($links as $key =&gt; $link) {
      $class = array($key);

      // Add first, last and active classes to the list of links to help out themers.
      if ($i == 1) {
        $class[] = 'first';
      }
      if ($i == $num_links) {
        $class[] = 'last';
      }
      if (isset($link['href']) &amp;&amp; ($link['href'] == $_GET['q'] || ($link['href'] == '&lt;front&gt;' &amp;&amp; drupal_is_front_page()))
         &amp;&amp; (empty($link['language']) || $link['language']-&gt;language == $language_url-&gt;language)) {
        $class[] = 'active';
      }
      $output .= '&lt;li' . drupal_attributes(array('class' =&gt; $class)) . '&gt;';

      if (isset($link['href'])) {
        // Pass in $link as $options, they share the same keys.
        $output .= '&lt;div class="desktop-only"&gt;';
        // This will give the native name of the lang like 'Français'
        $output .= l($link['language']-&gt;native, $link['href'], $link);
        // This will give the name of the lang like 'French' if the website is in English
        // $output .= l($link['language']-&gt;name, $link['href'], $link);
        $output .= '&lt;/div&gt;';
        $output .= '&lt;div class="mobile-only"&gt;';
        $output .= l($link['title'], $link['href'], $link);
        $output .= '&lt;/div&gt;';
      }
      elseif (!empty($link['title'])) {
        // Some links are actually not links, but we wrap these in &lt;span&gt; for adding title and class attributes.
        if (empty($link['html'])) {
          $link['title'] = check_plain($link['title']);
        }
        $span_attributes = '';
        if (isset($link['attributes'])) {
          $span_attributes = drupal_attributes($link['attributes']);
        }
        $output .= '&lt;div class="desktop-only"&gt;';
        // This will give the native name of the lang like 'Français'
        $output .= '&lt;span' . $span_attributes . '&gt;' . $link['language']-&gt;native . '&lt;/span&gt;';
        // This will give the name of the lang like 'French' if the website is in English
        // $output .= '&lt;span' . $span_attributes . '&gt;' . $link['language']-&gt;name . '&lt;/span&gt;';
        $output .= '&lt;/div&gt;';
        $output .= '&lt;div class="mobile-only"&gt;';
        $output .= '&lt;span' . $span_attributes . '&gt;' . $link['title'] . '&lt;/span&gt;';
        $output .= '&lt;/div&gt;';
      }

      $i++;
      $output .= "&lt;/li&gt;\n";
    }

    $output .= '&lt;/ul&gt;';
  }

  return $output;
}


Inside the code you will find the version for mobile and desktop with class added. 

    $output .= '&lt;div class="desktop-only"&gt;';
    // This will give the native name of the lang like 'Français'
    $output .= l($link['language']-&gt;native, $link['href'], $link);
    // This will give the name of the lang like 'French' if the website is in English
    // $output .= l($link['language']-&gt;name, $link['href'], $link);
    $output .= '&lt;/div&gt;';
    $output .= '&lt;div class="mobile-only"&gt;';
    $output .= l($link['language']-&gt;language, $link['href'], $link);
    $output .= '&lt;/div&gt;';


Then you'll have to hide the link (display:none;) in CSS depending on the resolution of you screen (with media queries)