I’m developing a website where the user will be able to enter some of his details like his phone number and / or his address.
So in order to help him in his tasks I’m using some dropdown lists which contain the list of all the countries and their associated area code for the phone number for instance.
My problem is I’m don’t know where I should ideally store this big list of countries ; should I put it in the database and then implement some kind of caching mechanism to avoid accessing the DB every time the dropdown is displayed ? Or should I store it into the application configuration ‘params’ array ?
Also note that even if today the website is only in english it’ll have multi-languages friendly.
I’ve been searching for this and found different solutions (db, separate files…etc), but I’m looking for the best practice in this situation.
Thanks in advance for your help !
May the yii, be with you