How to change "New content" text in entity connect autocomplete edit/add buttons? using entityreference autocomplete widget (field-widget-entityreference-autocomplete) with entity connect I have the buttons "New content" and "Edit content".

How can I just rename them in "New" and "Edit" respectively ?
These are coded in the value field of the input, hence I can't change them just with CSS..

I think I could do it on a form specific way using hook_form_alter, but I would like to apply it to any form where the widget appear.

I tried already hook_field_widget_form_alter(&amp;$element, &amp;$form_state, $context) but then I got lost, I am not sure it's the right place..
In a form alter you can access those two buttons with something like:

$field_name = "field_test";
$form[$field_name][LANGUAGE_NONE][0]["add_entityconnect__".$field_name."_0_"]["#value"] = t("New");
$form[$field_name][LANGUAGE_NONE][0]["edit_entityconnect__".$field_name."_0_"]["#value"] = t("Edit");


Adapt the name, language and cardinality of the field accordingly.

You can use a basic hook_form_alter to affect all forms. The widget creation code is in entityconnect.form.inc and it can't be altered (no hooks, no variables).