locale.module

Version 1.269 (checked in on 2009/11/18 at 19:25:28 by dries)

Add language handling functionality and enables the translation of the user interface to languages other than English.

When enabled, multiple languages can be set up. The site interface can be displayed in different languages, as well as nodes can have languages assigned. The setup of languages and translations is completely web based. Gettext portable object files are supported.

Constants

NameDescription
LOCALE_LANGUAGE_NEGOTIATION_BROWSERThe language is set based on the browser language settings.
LOCALE_LANGUAGE_NEGOTIATION_CONTENTThe language is determined using the current content language.
LOCALE_LANGUAGE_NEGOTIATION_SESSIONThe language is set based on the request/session parameters.
LOCALE_LANGUAGE_NEGOTIATION_URLThe language is determined using a URL language indicator: path prefix or domain according to the configuration.
LOCALE_LANGUAGE_NEGOTIATION_USERThe language is set based on the user language settings.

Functions

NameDescription
localeProvides interface translation services.
locale_block_infoImplement hook_block_info().
locale_block_viewImplement hook_block_view().
locale_date_format_formProvide date localization configuration options to users.
locale_date_format_form_submitSubmit handler for configuring localized date formats on the locale_date_format_form.
locale_date_format_language_overview_pageDisplay edit date format links for each language.
locale_date_format_reset_formReset locale specific date formats to the global defaults.
locale_date_format_reset_form_submitReset date formats for a specific language to global defaults.
locale_entity_info_alterImplement hook_entity_info_alter().
locale_field_attach_view_alterImplement hook_field_attach_view_alter().
locale_field_node_form_submitForm submit handler for node_form().
locale_form_alterImplement hook_form_alter().
locale_form_node_type_form_alterImplement hook_form_FORM_ID_alter().
locale_form_path_admin_form_alterImplement hook_form_FORM_ID_alter().
locale_get_pluralReturns plural form index for a specific number.
locale_helpImplement hook_help().
locale_inc_callbackWrapper function to be able to set callbacks in locale.inc
locale_initImplements hook_init().
locale_js_alterImplement hook_js_alter().
locale_language_listReturns array of language names
locale_language_nameReturns a language name
locale_language_negotiation_infoImplement hook_language_negotiation_info().
locale_language_selector_formForm builder callback to display language selection widget.
locale_language_types_infoImplement hook_language_types_info().
locale_localeImplement hook_locale().
locale_menuImplement hook_menu().
locale_multilingual_node_typeReturn whether the given content type has multilingual support.
locale_permissionImplement hook_permission().
locale_system_updateImports translations when new modules or themes are installed or enabled.
locale_themeImplement hook_theme().
locale_url_outbound_alterImplement hook_url_outbound_alter().
theme_locale_date_format_formTheme locale date format form.
theme_locale_translation_filtersTheme locale translation filter selector.
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.