Customization of the List of Countries in the Field Type Country of Registration Forms

Hi,
How I could customize the list of countries provided by the field type country in registration forms to reflect the official list of countries of the UN???.
Thanks for your replies,
DdM

Hey, so basically you could provide a CUSTOM_COUNTRIES option in your Indico config which should extend the basic list of countries we utilize. So, for example in indico.conf

CUSTOM_COUNTRIES = {'KP': 'North Korea'}

Excellent! Thank you for the advice!.

What about the translations?, in this case we need to have these in English and Spanish.

Regards,

DdM

as with all custom texts at the moment that’s currently not possible. as possible workaround is putting both versions in the same string, e.g. “english here / espanol here” - but of course that doesn’t look super amazing…

That would be enough for us!. Thank you very much!

Hi,
After placing the list of CUSTOM_COUNTRIES, I’m noticing that it doesn’t remove undesirable items in the list of countries.
Would there be a way to remove them from the list shown by the country field type?
Thanks in advance for your reply

Nope, that’s not possible. I’m curious, what’s your use case for that?

It’s because diplomatic reasons, our organization only recognizes UN associated countries.
Thanks for your reply.

OK, interesting use case. Being able to remove countries by setting them to None in the config would be pretty easy to add. If you have a developer who’s willing to send a Pull Request for it I think it’d have good chances to get merged.

This is the relevant file that needs to be changed:

Thank you again!. I’ll give it a try!.

Another route worth a try is regnerating pycountry against an up-to-date (and correct) debian pkg-isocode.
See https://salsa.debian.org/iso-codes-team/iso-codes and https://bitbucket.org/flyingcircus/pycountry/src for the respective sources.

Björn

Thank you Björn, definitely that is also an option!