FAQ

Target group: Developers, Integrators

Why is Kosovo missing in the list of countries?

The International Organisation for Standardisation (ISO) has not yet assigned an official country code to Kosovo. In the meantime you can use XK as a temporary code and add the country to the select list with a signal/slot or PSR-14 event. You can find more information on the GeoNames Blog.

I would like to add some regions to the list of countries. How can I achieve that?

Have a look at the official ISO 3166-2 standard for provinces or states. Then use a signal/slot or PSR-14 event to add those to the country list.

What alpha-2 code should I use to add a custom country?

Use one of the letters AA, QM to QZ, XA to XZ, or ZZ. They won’t be assigned officially and can be used for that purpose.

Can I use the country list in another extension?

Yes, there is a Service class available. This class is just a wrapper around the Symfony Intl component with additional Signals/PSR-14 events. If you don’t need the event, you can also use the Symfony component directly.