drupal - Drupal7 View Multilingual issue -
i have multilingual website in drupal 7. have view display content , view in code in 1 of custom module. not getting translation when view in code , works fine when it's in database. allow me seek explain:
i added content field , rewrite output of field, wrapped t() , excluded display. added global custom field , used replacement pattern display content field. exported view , saved in code in 1 of custom module.
now view in code , working fine expected in default language (english). when switched language, show english language content field , else showing translation.
i saved view in views ui without alter , view in database. refreshed page , got translation.
any thought or help appreciated. thanks!
try writing update script saves view that's in code database $view->save();
when update view, need update script updates view in database:
$view->delete(); ctools_include('object-cache'); ctools_object_cache_clear('view', $view->name); $view->save();
drupal drupal-7 views multilingual
No comments:
Post a Comment