running
isoquery af
returns
AF AFG 004 Afghanistan
running
isoquery -l pt
returns
AF AFG 004 Afeganistão
Calling this using exec() (or any of the other system commands such as system()) works fine using the php command line interpreter, but when this is run through mod_php it reverts to the english.
I've done some digging around and it looks like it may be something to do with apache resetting (emptying) the environment variables (see http://ubuntuforums.org/archive/index.php/t-357056.html).
For some reason the comment panel doesn't appear on the countries page even though it's defined using the same code as ranks and languages
http://pkg-isocodes.alioth.debian.org/ is a source of iso code data plus translations in various locales. On a debian system this can be installed using
apt-get install iso-codes
These codes by default are installed at
/usr/share/xml/iso-codes/
There is also a package which can be used to access the iso-codes in different locales called isoquery
apt-get install isoquery
Here's the isoquery man page: ISOQUERY(1) NAME
isoquery - Search and display various ISO codes (country, language, ...) SYNOPSIS
isoquery [options] [file] [ISO codes] DESCRIPTION
This manual page documents briefly the isoquery command. It can be used to generate a tabular output of the ISO standard codes provided by the package iso-codes. It parses the XML files and shows all included ISO codes or just matching entries, if specified on the command line. Moreover, it's possible to get all available translations for the ISO standard. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). isoquery supports the following options:
-i, --iso=NUMBER
The ISO standard to use. Possible values: 639, 3166, 4217, 15924 (default: 3166)
-n, --name
Name for the supplied codes (default)
-o, --official_name
Official name for the supplied codes. This may be the same as --name.
-c, --common_name
Common name for the supplied codes. This may be the same as --name.
-l, --locale=LOCALE
Use this locale for output.
-x, --xmlfile=FILE
Use another XML file with ISO data. (default: /usr/share/xml/iso-codes/iso_3166.xml)
-0, --null
Separate entries with a NULL character instead of newline.
-h, --help
Show summary of options.
-v, --version
Show program version and copyright.
EXAMPLES
If called without any command line options, isoquery will put out a table of all ISO 3166 codes. The first three columns contain the alpha-2 code, the alpha-3 code, and the numerical code assigned to the country listed in the fourth column. $ isoquery AF AFG 004 Afghanistan [...] ZW ZWE 716 Zimbabwe If you need only some countries, you can specify any of the codes in the first three columns to cut down the output. $ isoquery so nor 484 SO SOM 706 Somalia NO NOR 578 Norway MX MEX 484 Mexico Should you need the translations of the countries' names, just specify in which locale you'd like to see the output. Please note that the original English name will be shown if there is no translation available for the specified locale. $ isoquery --locale=nl fr de es FR FRA 250 Frankrijk DE DEU 276 Duitsland ES ESP 724 Spanje All of the above works for different ISO standards as well, so you can switch to language names by using the --iso command line option. For ISO 639, the first three columns are the ISO 639 2B code, the ISO 639 2T code and the ISO 639-1 code. The third column may be empty. $ isoquery --iso=639 aar aar aa Afar abk abk ab Abkhazian ace ace Achinese [...] zun zun Zuni zxx zxx No linguistic content zza zza Zaza; Dimili; Dimli; Kirdki You can trim down the results by specifying only some codes. Moreover, the option to get translated names is also available. $ isoquery --iso=639 --locale=pt vi bo kl vie vie vi Vietnamita tib bod bo tibetano kal kal kl Kalaallisut; Greenlandic You can get selected translations of currency names from the ISO 4217 standard by using the following command. The first two columns are the alpha-3 code and the numerical code assigned to the currency. $ isoquery --iso=4217 --locale=da cad 392 CAD 124 Canadisk dollar JPY 392 Japansk yen If you need to get script names, you can use the ISO 15924 table. The first two columns are the alpha-4 code and the numerical code assigned to the script. $ isoquery --iso=15924 jpan latn 280 Jpan 413 Japanese (alias for Han + Hiragana + Katakana) Latn 215 Latin Visp 280 Visible Speech FILES
By default, the XML files provided by the iso-codes package will be used.
/usr/share/xml/iso-codes/iso_639.xml
/usr/share/xml/iso-codes/iso_3166.xml
/usr/share/xml/iso-codes/iso_4217.xml
/usr/share/xml/iso-codes/iso_15924.xml LICENSE
Copyright (C) 2007-2008 Tobias Toedter <toddy@…>
Isoquery is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Isoquery is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. AUTHOR
Tobias Toedter <toddy@…>
List country information from geonames including neighbours
Ideally this should show author(Biblio: Authors), year (Biblio: Year of Publication), Title (Node: Title), Journal or Book Name( Biblio: Secondary Title), Volume (Biblio: Volume) and pages (Biblio: Pagination).
empty views should be displaying the view_empty contents rathern than nothing.
field_gbifnode needs to be split into field_standard_country, field_standard_lang and field_standard_rank
Currently alternates are not being updated when a new alternate name is added/updated, only when a standard version is edited/added. http://api.drupal.org/api/function/hook_nodeapi/5 possibly use "update index" or something similar
(or rather as a drop down select within contry?) - if we do the drop down then we won't be able to keep track of the resource which listed the languages.
Available from http://www.tdwg.org/standards/109/
http://gbif.myspecies.info/search/node/TODO lists pages with content to fill in. These are available to fill out.
see Sample Language Record for details
For some reason the comment panel doesn't appear on the countries page even though it's defined using the same code as ranks and languages
http://pkg-isocodes.alioth.debian.org/ is a source of iso code data plus translations in various locales. On a debian system this can be installed using
apt-get install iso-codes
These codes by default are installed at
/usr/share/xml/iso-codes/
There is also a package which can be used to access the iso-codes in different locales called isoquery
apt-get install isoquery
Here's the isoquery man page: ISOQUERY(1) NAME
isoquery - Search and display various ISO codes (country, language, ...) SYNOPSIS
isoquery [options] [file] [ISO codes] DESCRIPTION
This manual page documents briefly the isoquery command. It can be used to generate a tabular output of the ISO standard codes provided by the package iso-codes. It parses the XML files and shows all included ISO codes or just matching entries, if specified on the command line. Moreover, it's possible to get all available translations for the ISO standard. OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). isoquery supports the following options:
-i, --iso=NUMBER
The ISO standard to use. Possible values: 639, 3166, 4217, 15924 (default: 3166)
-n, --name
Name for the supplied codes (default)
-o, --official_name
Official name for the supplied codes. This may be the same as --name.
-c, --common_name
Common name for the supplied codes. This may be the same as --name.
-l, --locale=LOCALE
Use this locale for output.
-x, --xmlfile=FILE
Use another XML file with ISO data. (default: /usr/share/xml/iso-codes/iso_3166.xml)
-0, --null
Separate entries with a NULL character instead of newline.
-h, --help
Show summary of options.
-v, --version
Show program version and copyright.
EXAMPLES
If called without any command line options, isoquery will put out a table of all ISO 3166 codes. The first three columns contain the alpha-2 code, the alpha-3 code, and the numerical code assigned to the country listed in the fourth column. $ isoquery AF AFG 004 Afghanistan [...] ZW ZWE 716 Zimbabwe If you need only some countries, you can specify any of the codes in the first three columns to cut down the output. $ isoquery so nor 484 SO SOM 706 Somalia NO NOR 578 Norway MX MEX 484 Mexico Should you need the translations of the countries' names, just specify in which locale you'd like to see the output. Please note that the original English name will be shown if there is no translation available for the specified locale. $ isoquery --locale=nl fr de es FR FRA 250 Frankrijk DE DEU 276 Duitsland ES ESP 724 Spanje All of the above works for different ISO standards as well, so you can switch to language names by using the --iso command line option. For ISO 639, the first three columns are the ISO 639 2B code, the ISO 639 2T code and the ISO 639-1 code. The third column may be empty. $ isoquery --iso=639 aar aar aa Afar abk abk ab Abkhazian ace ace Achinese [...] zun zun Zuni zxx zxx No linguistic content zza zza Zaza; Dimili; Dimli; Kirdki You can trim down the results by specifying only some codes. Moreover, the option to get translated names is also available. $ isoquery --iso=639 --locale=pt vi bo kl vie vie vi Vietnamita tib bod bo tibetano kal kal kl Kalaallisut; Greenlandic You can get selected translations of currency names from the ISO 4217 standard by using the following command. The first two columns are the alpha-3 code and the numerical code assigned to the currency. $ isoquery --iso=4217 --locale=da cad 392 CAD 124 Canadisk dollar JPY 392 Japansk yen If you need to get script names, you can use the ISO 15924 table. The first two columns are the alpha-4 code and the numerical code assigned to the script. $ isoquery --iso=15924 jpan latn 280 Jpan 413 Japanese (alias for Han + Hiragana + Katakana) Latn 215 Latin Visp 280 Visible Speech FILES
By default, the XML files provided by the iso-codes package will be used.
/usr/share/xml/iso-codes/iso_639.xml
/usr/share/xml/iso-codes/iso_3166.xml
/usr/share/xml/iso-codes/iso_4217.xml
/usr/share/xml/iso-codes/iso_15924.xml LICENSE
Copyright (C) 2007-2008 Tobias Toedter <toddy@…>
Isoquery is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.
Isoquery is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. AUTHOR
Tobias Toedter <toddy@…>