Show 10 newest post for each value of a custom taxonomy

This code runs a foreach loop through each value associated with the language taxonomy then runs a query on that value to get the posts associated with it.

$taxonomies = get_categories( array( 'taxonomy' => 'language' ) );

    foreach ( $taxonomies as $tax ) {
        global $post;
        $args = array(
          'language' => $tax->category_nicename,
          'posts_per_page' => 10
          );

          $lang_query = new WP_Query( $args );

          echo $tax->name;
          echo '<ul>';
          while ($lang_query->have_posts() ) : $lang_query->the_post();

            echo '<li><a href="'.the_permalink().' ">' .the_title(). '</a> </li>';

            endwhile; wp_reset_postdata();

            echo '</ul>';
            echo '<a href=" '.get_category_link( $tax->term_id ).'">View all in ' .$tax->name. '</a>';

    }

tech