Hello,
Issue:
When using entity translation, and you have a separate language for your content and your interface, the field group labels will stick to the interface language.
Solution:
Improve the way the field group labels are handled, and allow a custom language to be passed.
Attached you can find a patch which makes the above possible without breaking any normal behaviour.
Below you can find the example hook which will show how you can make a difference between content and interface field groups using a hook in your custom module.
/**
* Implements hook_field_group_pre_render().
*
* Example call to make the label content language aware.
*/
function hook_field_group_pre_render(&$element, $group, &$form) {
if ($group->entity_type == 'node' && !empty($group->label)) {
if (isset($group->format_settings['instance_settings']['show_label']) && $group->format_settings['instance_settings']['show_label'] == 1) {
// Set content field groups to a different language. This can be set to
// for example $entity->language.
$group->label_language = 'nl';
}
}
}
Closed: won't fix
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.