I am comparing the values that appear in GUI Administration > Localization > Preferred Language options with the ones returned with the API. There you can see that Chinese Taiwan and Chinese China have the same value zh so that they cannot be distinguished.
Then when you use the API:
$result = civicrm_api3('OptionValue', 'get', array(
'sequential' => 1,
'option_group_id' => "languages",
'options' => array('limit' => 0),
'id' => array('IN' => array(557, 558)),
));
Then it will return beside this GUI 'value' also 'name':
{
"is_error": 0,
"version": 3,
"count": 2,
"values": [
{
"id": "557",
"option_group_id": "78",
"label": "Chinese (China)",
"value": "zh",
"name": "zh_CN",
"is_default": "0",
"weight": "137",
"is_optgroup": "0",
"is_reserved": "0",
"is_active": "1"
},
{
"id": "558",
"option_group_id": "78",
"label": "Chinese (Taiwan)",
"value": "zh",
"name": "zh_TW",
"is_default": "0",
"weight": "138",
"is_optgroup": "0",
"is_reserved": "0",
"is_active": "1"
}
]
}
The Administration GUI keeps this 'name' hidden and I cannot change it nor add it in new Languages, but it is this what is stored as preferred language for a contact, which again can be seen using the API and 'value' is not used anywhere.
May be I am missing something obvious here, but am I right that the GUI does not provide any facility to change code to for instance ISO-639-3? What would be the preferred way to get rid of Civi's default language 'name' options and use an ISO-639-3 equivalent in stead? Setting the 'value' is useless. Is there anyone that has been doing this successfully? Should I pursue using the API or direct MySQL manipuation to import my own Language options?