Last active
March 8, 2017 10:01
-
-
Save ClaudioVarandas/86d59d9fca973efb2cde0fb0924154e2 to your computer and use it in GitHub Desktop.
hook_language_negotiation_info for custom provider
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Implements hook_language_negotiation_info(). | |
*/ | |
function nap_language_negotiation_info() { | |
return array( | |
'nap_language_provider' => array( | |
'callbacks' => array( | |
'language' => 'MODULE_language_provider_callback', | |
'switcher' => 'MODULE_language_switcher_callback', | |
'url_rewrite' => 'MODULE_language_url_rewrite_callback', | |
), | |
'file' => drupal_get_path('module', 'nap') . '/nap.locale.inc', | |
'name' => t('My Language Selection'), | |
'description' => t('My Custom language selection mechanism.'), | |
), | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment