You are here

function configuration_translatables_export in Configuration Management 7

Helper function to return an array of t()'d translatables strings. Useful for providing a separate array of translatables with your export so that string extractors like potx can detect them.

3 calls to configuration_translatables_export()
field_configuration_export_render in includes/
Implements hook_configuration_export_render().
menu_custom_configuration_export_render in includes/
Implements hook_configuration_export_render()
menu_links_configuration_export_render in includes/
Implements hook_configuration_export_render()


./, line 397


function configuration_translatables_export($translatables, $indent = '') {
  $output = '';
  $translatables = array_filter(array_unique($translatables));
  if (!empty($translatables)) {
    $output .= "{$indent}// Translatables\n";
    $output .= "{$indent}// Included for use with string extractors like potx.\n";
    foreach ($translatables as $string) {
      $output .= "{$indent}t(" . configuration_var_export($string) . ");\n";
  return $output;