You are here

function lingotek_using_language_specific_profiles in Lingotek Translation 7.7

1 call to lingotek_using_language_specific_profiles()
lingotek_admin_prefs_form in ./lingotek.admin.inc
Lingotek prefs Form

File

./lingotek.admin.inc, line 3094

Code

function lingotek_using_language_specific_profiles() {

  // If any of the source languages are using a non-default profile, return true.
  $entity_types = variable_get('lingotek_entity_profiles');
  foreach ($entity_types as $type) {
    foreach ($type as $bundle => $profile_id) {
      if (strpos('__', $bundle) && $profile_id != LingotekSync::PROFILE_INHERIT) {
        return TRUE;
      }
    }
  }

  // If any of the profiles have custom or disabled targets, return true.
  $profiles = variable_get('lingotek_profiles');
  foreach ($profiles as $profile) {
    if (!empty($profile['target_language_overrides'])) {
      return TRUE;
    }
  }

  // No sign of language-specific settings
  return FALSE;
}