2
// $Id: i18n.admin.inc,v 1.2.2.7 2009/01/21 13:08:35 jareyero Exp $
6
* Extended multilanguage administration and module settings UI.
10
* Form builder function.
12
* TO DO: Add exclude paths for content selection
13
* Some options have been removed from previous versions:
14
* - Languages are now taken from locale module unless defined in settings file.
15
* - Language dependent tables are authomatically used if defined in settings file.
17
function i18n_admin_settings() {
18
// Content selection options.
19
$form['selection'] = array(
20
'#type' => 'fieldset',
21
'#title' => t('Content selection'),
22
//'#collapsible' => TRUE,
23
//'#collapsed' => TRUE,
25
$form['selection']['i18n_selection_mode'] = array(
27
'#title' => t('Content selection mode'),
28
'#default_value' => variable_get('i18n_selection_mode', 'simple'),
29
'#options' => _i18n_selection_mode(),
30
'#description' => t('Determines which content to show depending on the current page language and the default language of the site.'),
33
// Node translation links setting.
34
$form['links'] = array(
35
'#type' => 'fieldset',
36
'#title' => t('Content translation links'),
38
$form['links']['i18n_hide_translation_links'] = array(
39
'#type' => 'checkbox',
40
'#title' => t('Hide content translation links'),
41
'#description' => t('Hide the links to translations in content body and teasers. If you choose this option, switching language will only be available from the language switcher block.'),
42
'#default_value' => variable_get('i18n_hide_translation_links', 0),
44
$form['links']['i18n_translation_switch'] = array(
45
'#type' => 'checkbox',
46
'#title' => t('Switch interface for translating'),
47
'#default_value' => variable_get('i18n_translation_switch', 0),
48
'#description' => t('Switch interface language to fit node language when creating or editing a translation. If not checked the interface language will be independent from node language.'),
50
return system_settings_form($form);
53
// List of selection modes
54
function _i18n_selection_mode() {
56
'simple' => t('Current language and language neutral.'),
57
'mixed' => t('Mixed current language (if available) or default language (if not) and language neutral.'),
58
'default' => t('Only default language and language neutral.'),
59
'strict' => t('Only current language.'),
60
'off' => t('All content. No language conditions apply.'),