hi,

I'd love to give the submit button a different translation - but I just don't know where and/or how..
At the moment the German translation seems to be pulled from the overall drupal translation files - so it reads "Eintragen" which would basically mean something very close to "Submit" but it could be also understood as something like "Register" or "Enroll" or "Inscribe"...
Since I'm using webform as a contact form "Send" (or actually the german word "Abschicken") would much better describe the function of the form..

I already tried to find the submit button in the code - but could not find it.. There even one in the german.po-File but that seems to have no influence on the form-submit...
#: webform.module:589
msgid "Submit"
msgstr "Absenden"

thanks for any pointer/tipps..
greetz, t..

Comments

drubb’s picture

I've had the same problem and I'm now using this little workaround:

By appending a little javascript at the bottom of my page.tpl.php I was able to change the text:

<script type="text/javascript">
<!--
button = document.getElementById("edit-submitbutton");
if (button) button.value="Absenden";
//-->
</script>

It works for me, but it's the quick and dirty way.

Best regards,

Boris

tille’s picture

works like a charm - thank you very much!

I then also added a line of PHP and now it only appears in my webforms:

<?PHP if($node->type == "webform") { ?>
<script type="text/javascript">
<!--
button = document.getElementById("edit-submitbutton");
if (button) button.value="Abschicken";
//-->
</script>
<?PHP } ?>

greetings, tille..

tille’s picture

ähm - I actually have to correct myself - don't know the reason yet, but the javascript seems to break my webforms completely so that they won't function anymore - at all..:| I don't get any error messages, but the form wouldn't work either: no mail sent, no entry saved, no functionality.. - ..just as I described in this other issue:
http://drupal.org/node/165400

hm. So this means I can choose between a 'nice' sibmit button and a functional webform..? ..we'll see..

greetz, till..

bundes’s picture

you can change line 1178 of webform.module to the value you need:

'#value' => t('Submit'),

keesje’s picture

I would like to see this as a feature request, aside from Drupal tech arguments, it's not more than normal choosing a button text, depending on the form's nature. E.g. 'send mail' or 'subscribe to workshop' is much more semantic compared to 'submit'.

Just my 2...

Kees

tille’s picture

I totally agree - that would be really great - especially since webform is designed for having various forms.. I was actually already thinking of further 'hacking' bundes' 'hack' (thank you very much, bundes!) by adding some if-then's to them.. and maybe I'll still have to do that.. but of course it would be much nicer if it was possible to define that from the webform admin page..

greetz, t..

keesje’s picture

Component:Translation» User interface
Category:support» feature

@ tille,

Since you started this issue, why not update it to a feature request? I took the freedom to do so, please revert if it's not OK.

Kees

quicksketch’s picture

Status:Active» Closed (fixed)

Theming the form would be the proper way to change the title of the submit button. See THEMING.txt for an intro to theming forms.

Closing to clean up the issue queue.

jenlampton’s picture