I get the country code from field_data_commerce_customer_address
table in drupal commerce. Now how to get the full country name from this code.
You can use drupal cores country manager like this :
$country_list = \Drupal::getContainer()->get('country_manager')->getList();
$country_name = $country_list[$country_code]->render();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.