Plugin Author
Franky
(@liedekef)
You’re correct, I’ll try to update the doc today.
Plugin Author
Franky
(@liedekef)
Thank you. That works now.
You might edit your statement:
There are 3 columns required: “name”,”alpha_2″.
Should it be “2 columns”, or is there a third required column?
Plugin Author
Franky
(@liedekef)
You’re correct, only 2 are required, doc changed.
Hi,
I’ve just had a lot of trouble getting countries loaded. It would help a lot if the simple instructions were given on the page above the “import countries” button. That’s where it’s needed.
I dug into the code. That showed me that headers could be name, alpha_2, alpha_3, num_3 and locale. Unfortunately using those names didn’t work.
The documentation above says that the numeric id column should be num3. That isn’t consistent with the other column names and it’s not what I saw in the code.
I believe that the problems that I was having was that I was preparing the CSV file on a Macintosh and it was using carriage return ( ascii 13 ) as the line delimiter. When I converted to line feed ( ascii 10 ) the import succeeded.
Plugin Author
Franky
(@liedekef)
The import doc can be found in the documentation: https://www.e-dynamics.be/wordpress/category/documentation/19-csv-import/csv-import-countries-states/
I’ll take a look to linking it on the form and maybe also mention the line ending. Concerning the line endiy, read the remark about Macintosh here: http://php.net/manual/en/function.fgetcsv.php