diff --git a/nodeconnect.form.inc b/nodeconnect.form.inc
index df15870..16456bd 100644
--- a/nodeconnect.form.inc
+++ b/nodeconnect.form.inc
@@ -5,12 +5,12 @@
  */
 
 /*
- * Implements of hook_field_attache_form()
+ * Implements of hook_field_attach_form()
  *
  * here we attach a submit button for each node ref field
  */
-function _nodeconnect_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode='und', $field_name, $field) {
-  $language = $langcode ? $langcode : 'und';
+function _nodeconnect_field_attach_form($entity_type, $entity, &$form, &$form_state, $langcode=LANGUAGE_NONE, $field_name, $field) {
+  $language = $form[$field_name]['#language'];
   foreach ($form[$field_name][$language] as $key => $field) {
     if (is_numeric($key)) {
       // we have to add some extra js for single value fields so we add a class to let the
@@ -25,7 +25,7 @@ function _nodeconnect_field_attach_form($entity_type, $entity, &$form, &$form_st
         '#key' => $key,
         '#field' => $field_name,
         '#add_child' => TRUE,
-        '#language' => 'und',
+        '#language' => $language,
         '#submit' => array('nodeconnect_include_form', 'nodeconnect_add_edit_button_submit'),
         '#weight' => -2,
         '#attached' => array(
