8 * Implements hook_variable_info().
10 function i18n_string_variable_info($options = array()) {
11 $variables['i18n_string_translate_langcode_[language]'] = array(
12 'type' => 'multiple_language',
13 'title' => t('Enable translation for language'),
14 'multiple values' => array('type' => 'boolean'),
17 $variables['i18n_string_allowed_formats'] = array(
18 'title' => t('Translatable text formats'),
19 'options callback' => 'i18n_string_variable_format_list',
21 'default callback' => 'i18n_string_variable_format_default',
22 'description' => t('Only the strings that have the text formats selected will be allowed by the translation system. All the others will be deleted next time the strings are refreshed.'),
24 $variables['i18n_string_source_language'] = array(
25 'title' => t('Source language'),
27 'default callback' => 'i18n_string_source_language',
28 'description' => t('Language that will be used as the source language for string translations. The default is the site default language.'),
30 $variables['i18n_string_debug'] = array(
32 'title' => t('Debug string translation', array(), $options),
40 * Options callback, format list
42 function i18n_string_variable_format_list() {
44 // As the user has administer filters permissions we get a full list here
45 foreach (filter_formats() as
$fid => $format) {
46 $list[$fid] = $format->name
;
52 * Allowed formats default value
54 function i18n_string_variable_format_default() {
55 return array(filter_fallback_format());