Register custom taxonomy in array

PHP
function add_post_taxonomy() {

  $taxArray = array(
    array(
      "taxName" => 'tax中文名',
      "taxNameEn" =>'taxSlu'
    ),
  );

  foreach ($taxArray as $tax) {
    $labels = array(
      "name" => __( "", "" ),
      "singular_name" => __( $tax['taxName'], "" ),
      "menu_name" => __( $tax['taxName'], "" ),
      "all_items" => __( "所有", "" ),
      "edit_item" => __( "編輯", "" ),
      "view_item" => __( "檢視", "" ),
      "update_item" => __( "更新", "" ),
      "add_new_item" => __( "新增", "" ),
      "new_item_name" => __( "新增", "" ),
      "search_items" => __( "搜尋", "" ),
    );

    $args = array(
      "label" => __( $tax['taxName'], "" ),
      "labels" => $labels,
      "public" => true,
      "hierarchical" => true,
      "label" => $tax['taxName'],
      "show_ui" => true,
      "show_in_menu" => true,
      "show_in_nav_menus" => true,
      "show_admin_column" => true,
      "query_var" => true,
      "rewrite" => array( 'slug' => $tax['taxNameEn'], 'with_front' => true, ),
      "show_admin_column" => true,
      "show_in_rest" => false,
      "rest_base" => $tax['taxNameEn'],
      "show_in_quick_edit" => true,
    );
    register_taxonomy( $tax['taxNameEn'], 'post', $args );
  }
  
}
add_action( 'init', 'add_post_taxonomy' );