updated i18n, views, imagestyleflush, field_group
patch views_rss_media
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
CONTENTS OF THIS FILE
|
||||
---------------------
|
||||
|
||||
* Introduction
|
||||
* Requirements
|
||||
* Recommended modules
|
||||
* Installation
|
||||
* Configuration
|
||||
* Maintainers
|
||||
|
||||
|
||||
INTRODUCTION
|
||||
------------
|
||||
|
||||
The Multilingual content module, part of the Internationalization
|
||||
(https://www.drupal.org/project/i18n) package, provides extended multilingual
|
||||
options for nodes. These options help accommodate a variety of translation
|
||||
workflows by controlling how the language for nodes is set.
|
||||
|
||||
Note that the Multilingual content module lives in the i18n_node directory
|
||||
in the Internationalization package. Don't confuse this module with the core
|
||||
Content translation module.
|
||||
|
||||
* For a full description of the module visit:
|
||||
https://www.drupal.org/node/1279644.
|
||||
|
||||
* To submit bug reports and feature suggestions, or to track changes visit
|
||||
https://www.drupal.org/project/issues/i18n.
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
------------
|
||||
|
||||
This module requires the following module:
|
||||
|
||||
* Internationalization - https://www.drupal.org/project/i18n
|
||||
|
||||
|
||||
RECOMMENDED MODULES
|
||||
-------------------
|
||||
|
||||
* Internationalization Views - https://www.drupal.org/project/i18nviews
|
||||
* Language Icons - https://www.drupal.org/project/languageicons
|
||||
* Translation Overview - https://www.drupal.org/project/translation_overview
|
||||
* Localization Client - https://www.drupal.org/project/l10n_client
|
||||
* Internationalization contributions -
|
||||
https://www.drupal.org/project/i18n_contrib
|
||||
|
||||
|
||||
INSTALLATION
|
||||
------------
|
||||
|
||||
This is a submodule of the Internationalization module. Install the
|
||||
Internationalization module as you would normally install a contributed Drupal
|
||||
module. Visit https://www.drupal.org/node/895232 for further information.
|
||||
|
||||
|
||||
CONFIGURATION
|
||||
-------------
|
||||
|
||||
For each content type, the following Extended language options are available
|
||||
under the Multilingual Settings tab.
|
||||
1. "Set current language as default for new content" can be useful for content
|
||||
that is community-generated.
|
||||
2. "Require language" prevents users from creating 'Language neutral' nodes.
|
||||
3. "Lock language" prevents users from changing the language of a node after
|
||||
it's created.
|
||||
|
||||
Site-wide Settings for Node Translation
|
||||
1. There are also site-wide settings provided to help streamline how
|
||||
multilingual content is created. Navigate to Config > Regional and language >
|
||||
Multilingual settings > Node Options.
|
||||
2. "Switch interface for translating" switches the language of the user
|
||||
interface to the chosen language when a user translates a node. This is
|
||||
useful if users speak the language in which the translation is written. It
|
||||
means that after the node translation is saved, the language of the UI will
|
||||
match the language of the node.
|
||||
3. "Hide content translation links" will prevent the language switcher links
|
||||
from appearing in nodes and teasers. This is useful if a language switcher
|
||||
block is enabled on the site.
|
||||
4. The user can also select the default language for new nodes if the
|
||||
corresponding content type doesn't have language support. By default, it is
|
||||
set to be in the default language of the site, but this can be changed to be
|
||||
language neutral. This is a useful option when thinking about forward
|
||||
compatibility for adding multilingual support to these content types in the
|
||||
future.
|
||||
|
||||
|
||||
MAINTAINERS
|
||||
-----------
|
||||
|
||||
* Jose Reyero - https://www.drupal.org/u/jose-reyero
|
||||
* Florian Weber (webflo) - https://www.drupal.org/u/webflo
|
||||
* Peter Philipp - https://www.drupal.org/u/das-peter
|
||||
* Joseph Olstad - https://www.drupal.org/u/joseph.olstad
|
||||
* Nathaniel Catchpole - https://www.drupal.org/u/catch
|
@@ -9,9 +9,8 @@ configure = admin/config/regional/i18n/node
|
||||
files[]=i18n_node.test
|
||||
files[]=i18n_node.variable.inc
|
||||
|
||||
; Information added by Drupal.org packaging script on 2015-05-07
|
||||
version = "7.x-1.13"
|
||||
; Information added by Drupal.org packaging script on 2018-08-17
|
||||
version = "7.x-1.26"
|
||||
core = "7.x"
|
||||
project = "i18n"
|
||||
datestamp = "1430999922"
|
||||
|
||||
datestamp = "1534531985"
|
||||
|
@@ -222,8 +222,16 @@ function i18n_node_language_mode($type) {
|
||||
function i18n_node_node_prepare($node) {
|
||||
$options = variable_get('i18n_node_options_' . $node->type, array());
|
||||
if (i18n_node_type_enabled($node) && empty($node->nid) && !i18n_object_langcode($node) && in_array('current', $options)) {
|
||||
$default = variable_get('i18n_node_default_language_for_' . $node->type, '-- current --');
|
||||
|
||||
// Set current language for new nodes if option enabled
|
||||
$node->language = i18n_language_content()->language;
|
||||
if ($default === '-- current --') {
|
||||
$node->language = i18n_language_content()->language;
|
||||
}
|
||||
// If a custom language was specified, apply it.
|
||||
else {
|
||||
$node->language = $default;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -249,13 +257,16 @@ function i18n_node_permission() {
|
||||
/**
|
||||
* Implements hook_node_view()
|
||||
*/
|
||||
function i18n_node_node_view($node) {
|
||||
function i18n_node_node_view($node, $view_mode, $langcode) {
|
||||
if (i18n_node_type_enabled($node)) {
|
||||
$node->content['language'] = array(
|
||||
'#type' => 'item',
|
||||
'#title' => t('Language'),
|
||||
'#markup' => i18n_language_name($node->language),
|
||||
);
|
||||
$extra_fields_display_settings = field_extra_fields_get_display('node', $node->type, $view_mode);
|
||||
if ($extra_fields_display_settings['language']['visible']) {
|
||||
$node->content['language'] = array(
|
||||
'#type' => 'item',
|
||||
'#title' => t('Language'),
|
||||
'#markup' => i18n_language_name($node->language),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -265,7 +276,9 @@ function i18n_node_node_view($node) {
|
||||
* Handles links for extended languages. Sets current interface language.
|
||||
*/
|
||||
function i18n_node_node_view_alter(&$build) {
|
||||
$node = $build['#node'];
|
||||
if (isset($build['#node'])) {
|
||||
$node = $build['#node'];
|
||||
}
|
||||
// Hide node translation links.
|
||||
if (variable_get('i18n_hide_translation_links', 0)) {
|
||||
if (isset($build['links']['translation'])) {
|
||||
@@ -417,7 +430,16 @@ function i18n_node_form_node_type_form_alter(&$form, &$form_state) {
|
||||
// Some settings about node languages. Add variables for node type from variable definition
|
||||
if ($form['#node_type']->type) {
|
||||
variable_type_include('node_type');
|
||||
$form['i18n'] += node_variable_type_subform($form['#node_type']->type, array('i18n_node_options', 'i18n_node_extended'));
|
||||
$form['i18n'] += node_variable_type_subform($form['#node_type']->type, array('i18n_node_options', 'i18n_node_default_language_for', 'i18n_node_extended'));
|
||||
// Only show custom default language field if "current" is checked.
|
||||
$form['i18n']['i18n_node_default_language_for']['#states'] = array(
|
||||
'visible' => array(
|
||||
':input[name="i18n_node_options[current]"]' => array('checked' => TRUE),
|
||||
),
|
||||
'required' => array(
|
||||
':input[name="i18n_node_options[current]"]' => array('checked' => TRUE),
|
||||
),
|
||||
);
|
||||
}
|
||||
// Add disabled message
|
||||
if ($disabled) {
|
||||
@@ -506,8 +528,6 @@ function _i18n_node_form_node_form_alter($form, &$form_state) {
|
||||
}
|
||||
}
|
||||
elseif (variable_get('i18n_node_default_language_none', 0) && !isset($form['#node']->nid)) {
|
||||
// Override locale module setting default language to nodes. It is already in form_state.
|
||||
// $form['language']['#value'] = $form_state['values']['language'] = LANGUAGE_NONE;
|
||||
// Only do this if the language is really disabled
|
||||
if (variable_get('language_content_type_' . $node->type, 0) == 0) {
|
||||
// Override locale module setting default language to nodes. It is already in form_state.
|
||||
|
@@ -45,13 +45,30 @@ function i18n_node_variable_info($options = array()) {
|
||||
'repeat' => array(
|
||||
'type' => 'options',
|
||||
'options' => array(
|
||||
'current' => t('Set current language as default for new content.', array(), $options),
|
||||
// Note: this was previously used only to mark new, translatable nodes
|
||||
// with the current language of the user. Now, this setting is extended
|
||||
// to allow a specific language to be chosen (defaulting to the current
|
||||
// language). This was done for backwards compatibility reasons.
|
||||
'current' => t('Set custom language as default for new content.', array(), $options),
|
||||
'required' => t('Require language (Do not allow Language Neutral).', array(), $options),
|
||||
'lock' => t('Lock language (Cannot be changed).', array(), $options),
|
||||
),
|
||||
),
|
||||
'group' => 'i18n',
|
||||
);
|
||||
// This field will only be displayed if "current" is checked above.
|
||||
$variables['i18n_node_default_language_for_[node_type]'] = array(
|
||||
'type' => 'multiple',
|
||||
'title' => t('Custom default language', array(), $options),
|
||||
'repeat' => array(
|
||||
'type' => 'select',
|
||||
'options' => array_merge(array(
|
||||
'-- current --' => t('Current language')
|
||||
), locale_language_list('name')),
|
||||
'default' => '-- current --',
|
||||
),
|
||||
'group' => 'i18n',
|
||||
);
|
||||
$variables['i18n_node_extended_[node_type]'] = array(
|
||||
'type' => 'multiple',
|
||||
'title' => t('Extended language support'),
|
||||
|
Reference in New Issue
Block a user