Closed (duplicate)
Project:
Webform
Version:
6.x-3.14
Component:
Translation
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
7 Jul 2009 at 11:14 UTC
Updated:
27 Oct 2012 at 14:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
stevenpatzand a patch
Comment #2
ckidowcan anyone test this patch and report if it is possible to submit the form in different languages? 'cause there is a problme submitting the form in different languages than the basic language in which the form was created.
After pressing "submit" in other languages it directly redirects to the webform incl. filled in values... so nothing happens
Comment #3
konrad_m commentedIt works fine for me - event with version 3.0 - beta2 of Webform.
Comment #4
giorgosk6.x-3.0-beta2 needs a patch for options to be translatable
Comment #5
quicksketchThis patch won't be committed as it's written, since it's misuse of the t() function. However we started using the tt() function in #638168: Add tt wrapper to allow user roles to be translated, which seems like it would be appropriate to do here also.
Comment #6
giorgoskI need help in creating the
$nameforwebform_ttComment #7
quicksketchQuite honestly I don't know how that string is formatted either. Webform just used the same as other modules in #638168: Add tt wrapper to allow user roles to be translated. I imagine it should be something like: "webform:cid:$cid:option:$key", where $cid is the component ID and $key is the key specified by the user. Unfortunately we don't really have a $key that's dependable, since if the user is not using the "key|value" syntax, then the entire string ends up being the $key. This problem is the subject of #712324: Convert Select and Grid Options to New Data Storage, which would make it so we could always get a consistent $key.
The purpose of using tt() as I understand it is so that we can clean up unused strings when they're no longer needed. So when a component is deleted we should go through and delete all the translated options.
Comment #8
tomsm commentedsubscribing
Comment #9
quicksketch#712324: Convert Select and Grid Options to New Data Storage has been committed, meaning we can now get a reliable $key value to add to our tt() $name value. While this means that we can now have a reliable $name value, we also need to manage the deletion and updating of these strings as the components are modified or deleted.
Comment #10
xalexas commentedsubscribing
Comment #11
tomsm commentedThis issue still exists in 6.x-3.1. Patch #4 fixes this.
Comment #12
plachRelated issue: #245424-102: Make Webform multilingual (i18n) aware through contributed modules.
Comment #13
plachComment #14
giorgosk#4 will never make it in webform
its not the proper way
read #9
Comment #15
rantebi commentedDoes anybody know how to do this with drupal 7's cck.
There's no option for php code there ... :S
Comment #16
olafskiHello everybody,
I was going to test one of the patches, but then I noticed an interesting thing which might help somebody:
On my site, the character string "- Select -" was translatable. I found it using the search function of the translation admin pages. But watching the path, which is mentioned beneath the string, I guess the translatable string wasn't stored there by Webform (as module) but by an individual form which I set up earlier.
Or was the issue fixed in the meanwhile? (I use webform 6.3.14.)
Comment #17
quicksketchThis issue can now be solved through #245424: Make Webform multilingual (i18n) aware through contributed modules (which has been committed) and the sandbox project http://drupal.org/sandbox/GDrupal/1407100. Hopefully that project will be promoted to a full project as "webform_localization" sometime soon.
Drupal 6 users are currently still out of luck for an existing solution, though custom modules may now use hook_webform_component_render_alter(), which will allow translation of any properties (including select list options).
Comment #18
giorgoskIn a custom module I was able to do this
and then you can translate the usual way
unfortunatelly hook_webform_component_render_alter() is not documented in webform.api.php