Liste fields are not translatable atm. We should provide some field and filter handler to fix this. There are some API functions in i18n_field to do that.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | i18nviews_translate_list_fields_1241514.patch | 2.6 KB | mindgame |
| #4 | translate-list-fields-in-filters-1241514-4-D7.patch | 2.73 KB | webflo |
| #3 | translate-list-fields-in-filters-1241514-D7.patch | 2.33 KB | webflo |
Comments
Comment #1
webflo commentedComment #2
vasikei can confirm this
Comment #3
webflo commentedHere is a patch. This patch provides a translated filter handler for each field.
Comment #4
webflo commentedComment #5
vasikei had no success with #4 solution. nothing seems to be changed.
Comment #6
irishdan commentedsubscribe
Comment #7
mindgame commentedI have rewritten the patch using hook_field_views_data_alter() because hook_field_views_data() was never called.
Also I changed get_value_options() in i18nviews_handler_filter_field_list.inc to translate the allowed values before calling list_allowed_values() as it is done in i18n_field.module, i18n_field_field_widget_form().
Works for me.
Comment #8
webflo commentedYeah looks good. Uploaded the wrong patch.
Comment #9
vasikethe solution from #7 worked for me too.
Comment #10
r13ose commentedI have tried the solution in #7 and this works for me as well.
Comment #11
webflo commentedi18n Views does not override existing views handlers. i18 Views implements new handlers with multilingual capabilities.
Comment #12
webflo commentedFixed. Commit edc68d1 on 7.x-3.x.
@ mindgame: list_allowed_values() has a static cache. You should not pass translated options to this function. Once you pushed translated options to this function, its impossible to get untranslated field values or translated field values for other languages.
Comment #13
vasikei re-open the issue. there's no success to Translate list fields, in my case List (integer) field.
Comment #14
vasikeComment #15
webflo commentedComment #16
webflo commented@vasike: Please provide a views export.