/[drupal]/contributions/modules/i18n/i18n.admin.inc
ViewVC logotype

Contents of /contributions/modules/i18n/i18n.admin.inc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Sun Feb 17 13:13:17 2008 UTC (21 months, 1 week ago) by jareyero
Branch: MAIN
CVS Tags: DRUPAL-6--1-0-BETA2, DRUPAL-6--1-0-BETA1, HEAD
Branch point for: DRUPAL-6--1
Changes since 1.1: +1 -8 lines
File MIME type: text/x-php
Fixed update script
1 <?php
2 // $Id: i18n.admin.inc,v 1.1 2008/02/15 22:51:41 jareyero Exp $
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 */
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,
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
36 function _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

  ViewVC Help
Powered by ViewVC 1.1.2