function i18n_translation_options_list in Internationalization 7
Get list of translation modes
2 calls to i18n_translation_options_list()
- i18n_forum_form_taxonomy_form_vocabulary_alter in i18n_forum/
i18n_forum.module - Implements hook_form_FORM_ID_alter()
- i18n_translation_options in i18n_translation/
i18n_translation.module - Get list of translation modes
File
- i18n_translation/
i18n_translation.module, line 168 - Internationalization (i18n) module - Entity translations
Code
function i18n_translation_options_list($replacements = array(), $options = array()) {
$list = array(
I18N_MODE_NONE => t('No multilingual options for @item_name_multiple. Only the @container_name will be translatable.', $replacements),
I18N_MODE_LOCALIZE => t('Localize. @item_name_multiple_capitalized are common for all languages, but their name and description may be localized.', $replacements),
I18N_MODE_TRANSLATE => t('Translate. Different @item_name_multiple will be allowed for each language and they can be translated.', $replacements),
I18N_MODE_MULTIPLE => t('Translate and Localize. @item_name_multiple_capitalized with language will allow translations. @item_name_multiple_capitalized without language will be localized.', $replacements),
I18N_MODE_LANGUAGE => t('Fixed Language. @item_name_multiple_capitalized will have a global language and they will only show up for pages in that language.', $replacements),
);
if ($options) {
foreach (array_keys($list) as $key) {
if (!in_array($key, $options, TRUE)) {
unset($list[$key]);
}
}
}
return $list;
}