We are testing drupal for a new site and are stuck with a problem. The site is
bilingual, Finnish and English. We are using pathauto to generate better urls
for pages using the pattern "[menupath-raw]/[title-raw].html".
We have a page buried in the menu under "Home » Department » Premises &
Equipment » CS-building » AV equipment loans" in English and "Etusivu » Laitos
» Tilat & Välineet » T-talo » Lainattava AV-kalusto" in Finnish. We would like
the urls generated to be
"/en/department/premises-equipment/cs-building/av-equipment-loans/av-equipment-loans.html"
and "/fi/laitos/tilat-valineet/t-talo/lainattava-av-kalusto.html" respectively.
I do realize that this might need an additional "[language]/" in some patterns.
The urls are only generated correctly in English. The Finnish path is generated
as "/lainattava-av-kalusto.html". It's missing the [menupath-raw]
-part and there is an inconsistency with the language path component.
I traced this a bit in the source code and it seems to me that the the problem
is in the token-module function _menu_titles() located in token_node.inc. It
doesn't seem to take i18n into account at all.
Could someone who is familiar with Drupal and internationalization confirm
this? Or even better, provide a fix?
We are using Drupal 6.4, pathauto 6.x-1.1, i18n-6.x-1.0-beta3 and
token-6.x-1.11 on Debian GNU/Linux 4.0.
PS. I'm sorry about the project/component. I couldn't get this submitted using
Token/other or anything else that I thought would apply. Please pass this
ticket around to the correct project and component.
Comments
Comment #1
gregglesAs you say, this is probably better categorized within the token project.
Unfortunately I don't work much with i18n so I may not be able to figure this out. If you can't find the answer then I suggest looking for other users who might be interested ( http://groups.drupal.org/i18n ) or just posting a bounty for it (i.e. saying "I'll be $50 for whomever can provide a patch to fix this").
Comment #2
toemaz commentedI have a similar issue but a little more specific. I use book pages with the following alias: [bookpath]/[title-raw] I have books translated in 4 languages.
When I do a bulk alias generation, I end up with well formed aliases for en but not of the other languages which don't take [bookpath] into account. However, when I edit and save one of the non en book pages, I end up with a good auto formatted alias for this non en language, i.e. [bookpath]/[title-raw]. But, after this save the alias for the en book page has changed and is now simply [title-raw] without [bookpath]
I solved this for the time being by adding a fixed name for the auto alias for each language: en -> handbook/[title-raw], de -> handbuch/[title-raw]
I use Drupal 6.4, Token 6.x-1.x-dev and Pathauto 6.x-1.1
Comment #3
claudiu.cristeaThis ia a duplicate of #295529: Book & Menu paths tokens not calculated for the translated nodes.