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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

webflo’s picture

Category: bug » feature
vasike’s picture

Category: feature » bug

i can confirm this

webflo’s picture

Status: Active » Needs review
FileSize
2.33 KB

Here is a patch. This patch provides a translated filter handler for each field.

webflo’s picture

vasike’s picture

i had no success with #4 solution. nothing seems to be changed.

irishdan’s picture

subscribe

mindgame’s picture

I 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.

webflo’s picture

Status: Needs review » Reviewed & tested by the community

Yeah looks good. Uploaded the wrong patch.

vasike’s picture

the solution from #7 worked for me too.

R13ose’s picture

I have tried the solution in #7 and this works for me as well.

webflo’s picture

Status: Reviewed & tested by the community » Needs work

i18n Views does not override existing views handlers. i18 Views implements new handlers with multilingual capabilities.

webflo’s picture

Status: Needs work » Fixed

Fixed. 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.

vasike’s picture

Status: Fixed » Needs work

i re-open the issue. there's no success to Translate list fields, in my case List (integer) field.

vasike’s picture

Priority: Normal » Critical
webflo’s picture

Assigned: Unassigned » webflo
Issue tags: +dvcs11
webflo’s picture

Status: Needs work » Postponed (maintainer needs more info)

@vasike: Please provide a views export.