Friday, February 6, 2009

How to change the label of the save button?

Recently ran into an interesting request on how to change the label of the save button on the edit form to something else. While I don't believe there is a direct way to do this in Xataface, you can utilize a little workaround with the feature of "internationalization" of Xataface to get this to work.

How you can do this is:

  1. Create a 'lang' folder in the delegate folder of your class you wish to change the edit form form

  2. Inside that folder, create an en.ini file.

  3. Then add this line:
    save_button_label="Submit"

    What this does is it overrides the label and causes it to say Submit.



The real function of this feature is to actually allow the display of that label to differ depending on the language chosen. In our case, we just override the original label for english (ie. en) and volia!

A nice little work around hey?

No comments: