Home News Bugs Downloads Docs Forum CVS Stats
Information
|
|
Details
Help text for forms should be translatable.
Comments
Been planning on adding something to fix all these. Not sure if I should add something to the parser to parse them out and translate them, or if template_simple() should automatically be called on the $extra property of the widgets on rendering, or just hard-coding them in like you did. I'll have to think more on that one.
I have a suggestion. it would be to code formhelp stuff in PHP instead of adding js everywhere...
1- Add formhelp.js systematically in MailForm constructor instead of having to add it in every forms.
2- Add a $help attribute to MF_Widget. Modify MF_Widget so it automatically adds needed js code when $help attribute is set.
3- Use intl_get function when setting $help attribute. For example, given $w widget, you would add help like this:
$w->help = intl_get('My help text.');
4- Add an help attribute to settings.php form ini file. Automatically translate it when parsing the ini file.
What do you think about it? If you like it, I think I could implement it if you want.
Charles.
Add Comment
You must be logged in to comment.
Corrected in CVS for cms module