Closed (fixed)
Project:
Pathauto
Version:
7.x-1.2
Component:
I18n stuff
Priority:
Minor
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
11 Oct 2012 at 09:31 UTC
Updated:
22 Oct 2012 at 11:17 UTC
Is it possible to have different settings for separator and character case per language?
We have a website with English and Russian languages and our preferred URL structure is
English: http://www.englishdomain.com/category/node-title
Russian: http://www.russiandomain.ru/Категория/Название_Статьи
Thank you for the great module.
Yuri
Comments
Comment #1
nonstoplife commentedSolved the problem with hook_variable_info.
Added the following code to mymodule.module:
/**
* Implements hook_variable_info().
*/
function mymodule_variable_info($options) {
$variables['pathauto_separator'] = array(
'title' => t('Pathauto Separator'),
);
$variables['pathauto_case'] = array(
'title' => t('Pathauto Case'),
);
return $variables;
}
/**
* Implements hook_variable_info_alter() to make these variables 'localizable' .
*/
function mymodule_variable_info_alter(&$variables, $options) {
// Make the above variables translatable
$variables['pathauto_separator']['localize'] = TRUE;
$variables['pathauto_case']['localize'] = TRUE;
}
Then flushed cache and enabled the variables Pathauto Separator and Pathauto Case at Multilingual Variables /admin/config/regional/i18n/variable. Now one can set up different Separator and Case settings per language.