在jQuery表单向导中更改上一个和下一个按钮的标签?

在jQuery表单向导中更改上一个和下一个按钮的标签?

问题描述:

I'm using jQuery Form Wizard and I am in the need of making it translatable. I've got the actual translation working for the form for everything but the buttons which seem hard-coded (and I am really new to jQuery).

Is there a way of making the labels change dynamically according to the rest of the translation support, which uses an URL parameter and the translated strings in variables? This is coded with php.

Edit: That I need help with is to change the label of the previous, next and submit button in jQuery Form Wizard module: http://www.thecodemine.org/#

Edit 2: Well, I've tried to actually change the value of the HTML, but it only works for the back button. Next button label is still "Next". I also tried using jQuery to change the value for me, with the same result, using #next.val("My own next value");

我正在使用jQuery表单向导,我需要使它可以翻译。 我有实际的翻译工作表格的所有东西,但看起来硬编码的按钮(我真的是新的jQuery)。 p>

有没有办法制作标签 根据翻译支持的其余部分动态更改,翻译支持使用URL参数和变量中的翻译字符串? 这是用php编码的。 p>

编辑:我需要帮助的是更改jQuery Form Wizard模块中上一个,下一个和提交按钮的标签: http://www.thecodemine.org/# p>

编辑2:嗯,我已经 试图实际更改HTML的值,但它只适用于后退按钮。 下一个按钮标签仍然是“下一步”。 我也尝试使用jQuery来改变我的值,结果相同,使用#next.val(“我自己的下一个值”); p> div>

No, PHP can only edit the document before it is loaded into the browser, not after being displayed.

  1. An option is to use a Javascript Translator such as Google Translate.
  2. Another option is to set the language of your webpage as a meta tag and hope the browser asks to translate the page (ie Google Chrome will)

Edit: Looking at the JQuery code wizard docs, there are two build in functions textNext and textBack and finally (textSubmit) ie

$('#idOfForm').formwizard('textNext','newText');