How would I use php-intl to convert country codes to localized country names
问题 Hello I need to retrieve full country names based on a country code and a locale in PHP. Since php-intl is now supposed to be able to do this I want to use that. nl_NL nl -> Nederland uk -> Verenigd Koninkrijk en_UK nl -> The Netherlands uk -> United Kindom I think I need to use php-intl resource bundles somehow, but am unable to find any useful examples. 回答1: Exactly. The intl methods can help you with that. You need to use Locale::getDisplayRegion Object oriented style: static string Locale