Drupal - How to get custom field labels translated
Last days, I got the same issue to translate labels and descriptions of custom. here is what i did to solve it.
- Enable i18n's i18_field "Field translation" submodule
- Go to
admin/config/regional/translate/i18n_string
- Checked 'fields' (properly check all) and Click on "Refresh strings".
- Go to
admin/config/regional/translate/translate
- Search desired string and translated it to other lang.
I print translated field labels this way (using i18n_field.module):
$instance = field_info_instance('node', $my_field_name, $my_node_type);
$my_translated_label = i18n_field_translate_property($instance, 'label');
Hope it helps.
You shouldn't change the default language to Dutch to test it, since then it sets that your field names (and all other things in website) are in Dutch.
Instead I suggest to use 'Detection and Selection' options, and enable Browser or User, then test it in other Browser in Dutch, or with another User whose language is set to Dutch.
The better and more comfortable way would be using Language Switcher block, enabling URL or Session under Detection and Selection settings.
So that, the default language of website still stays English and the fields are translated if someone is using the website in Dutch.