diff --git a/includes/language.inc b/includes/language.inc index 3fe18ef..ea63948 100644 --- a/includes/language.inc +++ b/includes/language.inc @@ -102,7 +102,7 @@ define('LANGUAGE_NEGOTIATION_DEFAULT', 'language-default'); */ /** - * Return all the defined language types. + * Returns all the defined language types. * * @return * An array of language type names. The name will be used as the global @@ -121,7 +121,7 @@ function language_types_info() { } /** - * Return only the configurable language types. + * Returns only the configurable language types. * * A language type maybe configurable or fixed. A fixed language type is a type * whose language negotiation providers are module-defined and not altered @@ -159,7 +159,7 @@ function language_types_configurable($stored = TRUE) { } /** - * Disable the given language types. + * Disables the given language types. * * @param $types * An array of language types. @@ -213,7 +213,7 @@ function language_types_set() { } /** - * Check whether a language negotiation provider is enabled for a language type. + * Checks whether a language negotiation provider is enabled for a language type. * * This has two possible behaviors: * - If $provider_id is given return its ID if enabled, FALSE otherwise. @@ -247,14 +247,13 @@ function language_negotiation_get($type, $provider_id = NULL) { } /** - * Check if the given language negotiation provider is enabled for any - * configurable language type. + * Checks if the language negotiation provider is enabled for any language type. * * @param $provider_id * The language negotiation provider ID. * * @return - * TRUE if there is at least one language type for which the give language + * TRUE if there is at least one language type for which the given language * provider is enabled, FALSE otherwise. */ function language_negotiation_get_any($provider_id) { @@ -268,7 +267,7 @@ function language_negotiation_get_any($provider_id) { } /** - * Return the language switch links for the given language. + * Returns the language switch links for the given language. * * @param $type * The language negotiation type. @@ -315,8 +314,7 @@ function language_negotiation_get_switch_links($type, $path) { } /** - * Updates language configuration to remove any language negotiation provider - * that is no longer defined. + * Removes any unused language negotation providers from the configuration. */ function language_negotiation_purge() { // Ensure that we are getting the defined language negotiation information. An @@ -339,7 +337,7 @@ function language_negotiation_purge() { } /** - * Save a list of language negotiation providers. + * Saves a list of language negotiation providers. * * @param $type * The language negotiation type. @@ -387,7 +385,7 @@ function language_negotiation_set($type, $language_providers) { } /** - * Return all the defined language negotiation providers. + * Returns all the defined language negotiation providers. * * @return * An array of language negotiation providers. @@ -425,7 +423,7 @@ function language_negotiation_info() { * in, it will be loaded through language_negotiation_info(). * * @return - * A language object representing the language chosen by the method. + * A language object representing the language chosen by the provider. */ function language_provider_invoke($provider_id, $provider = NULL) { $results = &drupal_static(__FUNCTION__); @@ -456,13 +454,13 @@ function language_provider_invoke($provider_id, $provider = NULL) { // Since objects are resources, we need to return a clone to prevent the // language negotiation provider cache from being unintentionally altered. The - // same methods might be used with different language types based on + // same providers might be used with different language types based on // configuration. return !empty($results[$provider_id]) ? clone($results[$provider_id]) : $results[$provider_id]; } /** - * Return the passed language negotiation provider weight or a default value. + * Returns the passed language negotiation provider weight or a default value. * * @param $provider * A language negotiation provider data structure. @@ -504,7 +502,7 @@ function language_initialize($type) { } /** - * Default language negotiation provider. + * Returns the default language negotiation provider. * * @return * The default language code. diff --git a/modules/system/language.api.php b/modules/system/language.api.php index 2e2dbea..d868b6f 100644 --- a/modules/system/language.api.php +++ b/modules/system/language.api.php @@ -71,9 +71,9 @@ function hook_language_switch_links_alter(array &$links, $type, $path) { * may contain the following elements: * - name: The human-readable language type identifier. * - description: A description of the language type. - * - fixed: A fixed array of language negotiation provider identifiers to use to - * initialize this language. Defining this key makes the language type - * non-configurable, so it will always use the specified methods in the + * - fixed: A fixed array of language negotiation provider identifiers to use + * to initialize this language. Defining this key makes the language type + * non-configurable, so it will always use the specified providers in the * given priority order. Omit to make the language type configurable. * * @see hook_language_types_info_alter() @@ -107,12 +107,12 @@ function hook_language_types_info_alter(array &$language_types) { } /** - * Define language negotiation methods. + * Define language negotiation providers. * * @return - * An associative array of language negotiation method definitions. The keys - * are method identifiers, and the values are associative arrays definining - * each method, with the following elements: + * An associative array of language negotiation provider definitions. The keys + * are provider identifiers, and the values are associative arrays definining + * each provider, with the following elements: * - types: An array of allowed language types. If a language negotiation * provider does not specify which language types it should be used with, it * will be available for all the configurable language types. @@ -122,15 +122,15 @@ function hook_language_types_info_alter(array &$language_types) { * the language value. * - language_switch: (optional) Name of the callback function that * determines links for a language switcher block associated with this - * method. See language_switcher_url() for an example. + * provider. See language_switcher_url() for an example. * - url_rewrite: (optional) Name of the callback function that provides URL - * rewriting, if needed by this method. + * rewriting, if needed by this provider. * - file: The file where callback functions are defined (this file will be * included before the callbacks are invoked). - * - weight: The default weight of the method. - * - name: The translated human-readable name for the method. - * - description: A translated longer description of the method. - * - config: An internal path pointing to the method's configuration page. + * - weight: The default weight of the provider. + * - name: The translated human-readable name for the provider. + * - description: A translated longer description of the provider. + * - config: An internal path pointing to the provider's configuration page. * - cache: The value Drupal's page cache should be set to for the current * provider to be invoked. *