[英]How to get country name from country code in Drupal Commerce
我从drupal field_data_commerce_customer_address
表中获取国家/地区代码。 现在如何从此代码获取完整的国家名称。
您可以像这样使用drupal cores区域经理:
$country_list = \Drupal::getContainer()->get('country_manager')->getList();
$country_name = $country_list[$country_code]->render();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.