Closed (works as designed)
Project:
Form Markup
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 May 2010 at 20:20 UTC
Updated:
20 Mar 2012 at 15:03 UTC
I needed to translate the prefix and suffix values I added using the form markup module.
In my use case I was adding a label and some descriptive text to the form and needed to have it translated.
Attached is a really simple patch that just wraps the output in a translation "t" tag.
Cheers!
| Comment | File | Size | Author |
|---|---|---|---|
| form_markup_translation.patch | 706 bytes | Architeck |
Comments
Comment #1
Architeck commentedI realize, after some testing, that this is not the best approach.
For a few reasons,
1) the translation interface doesn't like html markup, and we don't really want to do this (http://drupal.org/node/372965)
2) It works.. but in some cases you may get an empty 'Array' printed out on the screen. I had to remove the t() function from the suffix field to get the result I was hoping for.
An overall better approach would be to add some filtering options to the #prefix and #suffix textareas that would allow the user to choose html or php code input format, then they can run their own code through the t() if it needs to be translated.
Comment #2
Architeck commented