PHP intl country code 2 chars to country name

后端 未结 8 1073
猫巷女王i
猫巷女王i 2021-02-18 17:57

I\'m triying to convert, using PHP, 2 characters country code (ISO 3166-1) to country names, or intl country codes, so I can translate the country name.

Using Loca

8条回答
  •  失恋的感觉
    2021-02-18 18:35

    You don't have to have a fully-formed locale for the first parameter. This makes the function useful for getting the country name from any locale:

    
    

    http://php.net/manual/en/locale.getdisplayregion.php#115523

提交回复
热议问题