I'd like to change the "Go" button to the Swedish "Gå". If I change it in the code it won't work, neither if I use the letter itself or the html entity. How can I change the "Go" text to something else easily?

Thanks!

Comments

JaredAM’s picture

Humm, one thing you could do is use hook_form_alter to change the text.

Create a module, then

function mymodule_form_alter($form_id, &$form) {

// Modify the form

if ($form_id == "jump_quickly_form_1"){
$form['submit']['#value'] = "mytext";
}
}

Or you could use an image but that's a little more complicated: http://drupal.org/node/62647

Zoologico’s picture

As a follow up, how do you know what the form id is?

JaredAM’s picture

"print_r" is your best friend.

In your module you can write:

print "<pre>"; // print pretty
print_r($form); // print out all the stuff in the form array
print "</pre>" // end print pretty

For the form id you can just use "print($form_id);" since it's not an array.

marcp’s picture

Your other options are to:

1. Override theme_jump_quickly_form()
2. Use translations via locale
3. Use the String Overrides module -- see http://www.lullabot.com/articles/replace-any-string-drupal-5-6-without-l...

There's a lot of information "out there" on all of these methods. Figuring out how to do #2 or #3 would probably provide your best return on investment.

Please let us know what you choose and how it all turns out.

marcp’s picture

Status: Active » Closed (won't fix)