Updated i18nprofile for Drupal 6.0
[project/i18n.git] / i18n.admin.inc
CommitLineData
818652bd
JR
1<?php
2// $Id$
3
4/**
5 * @file
6 * Extended multilanguage administration and module settings UI.
7 */
8
9/**
10 * Form builder function.
11 *
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
16 */
17function 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,
24 );
25 $form['selection']['i18n_selection_mode'] = array(
26 '#type' => 'radios',
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 language.'),
31 );
32 return system_settings_form($form);
33}
34
35// List of selection modes
36function _i18n_selection_mode(){
37 return array(
38 'simple' => t('Only current language and no language'),
39 'mixed' => t('Only current and default languages and no language'),
40 'default' => t('Only default language and no language'),
41 'strict' => t('Only current language'),
42 'off' => t('All content. No language conditions apply'),
43 );
44}
45