diff --git a/modules/locale/locale.module b/modules/locale/locale.module
index 871048b..489606a 100644
--- a/modules/locale/locale.module
+++ b/modules/locale/locale.module
@@ -307,20 +307,6 @@ function locale_language_selector_form(&$form, &$form_state, $user) {
/**
* Implements hook_form_FORM_ID_alter().
*/
-function locale_form_path_admin_form_alter(&$form, &$form_state) {
- $form['language'] = array(
- '#type' => 'select',
- '#title' => t('Language'),
- '#options' => array(LANGUAGE_NONE => t('All languages')) + locale_language_list('name'),
- '#default_value' => $form['language']['#value'],
- '#weight' => -10,
- '#description' => t('A path alias set for a specific language will always be used when displaying this page in that language, and takes precedence over path aliases set for All languages.'),
- );
-}
-
-/**
- * Implements hook_form_FORM_ID_alter().
- */
function locale_form_node_type_form_alter(&$form, &$form_state) {
if (isset($form['type'])) {
$form['workflow']['language_content_type'] = array(
diff --git a/modules/path/path.admin.inc b/modules/path/path.admin.inc
index f10142b..dd72818 100644
--- a/modules/path/path.admin.inc
+++ b/modules/path/path.admin.inc
@@ -130,11 +130,23 @@ function path_admin_form($form, &$form_state, $path = array('source' => '', 'ali
'#required' => TRUE,
);
- // This will be a hidden value unless locale module is enabled.
- $form['language'] = array(
- '#type' => 'value',
- '#value' => $path['language']
- );
+ // A hidden value unless locale module is enabled.
+ if (module_exists('locale')) {
+ $form['language'] = array(
+ '#type' => 'select',
+ '#title' => t('Language'),
+ '#options' => array(LANGUAGE_NONE => t('All languages')) + locale_language_list('name'),
+ '#default_value' => $path['language'],
+ '#weight' => -10,
+ '#description' => t('A path alias set for a specific language will always be used when displaying this page in that language, and takes precedence over path aliases set for All languages.'),
+ );
+ }
+ else {
+ $form['language'] = array(
+ '#type' => 'value',
+ '#value' => $path['language']
+ );
+ }
$form['actions'] = array('#type' => 'actions');
$form['actions']['submit'] = array(