I working with multilanguage site with subdomains and want to do an equal navigation in subdomains, for example:
english site - http://mysite.com/node1.html - displays node in english language
german site - http://de.mysite.com/node1.html - displays node in german language
russian site - http://ru.mysite.com/node1.html - displays node in russian language
In Drupal 5 table 'url_aliases' have no language affiliation for aliases. And then there was no opportunities to make equal aliases for different translation of one node. Therefore, Pathauto adds numbers to equal aliases:
english site - http://mysite.com/node1.html
german site - http://de.mysite.com/node1.html-0
russian site - http://ru.mysite.com/node1.html-1
Drupal 6 have additional field 'language' in 'url_aliases' table. At this time Drupal 6 have a way to do an equal navigation in multilaguage sites with subdomains with original path module.
And, I think, pathauto module for Drupal 6 needs some patches for solve my problem and expand his functionality. Does anybody have some developments for this way?
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | pathauto_210595.patch | 2.04 KB | drewish |
| #7 | pathauto_210595.patch | 8.12 KB | drewish |
| #6 | pathauto_210595.patch | 8.18 KB | drewish |
| #2 | pathauto_drupal6_multilanguage_1.1.patch | 7.32 KB | murz |
| #1 | pathauto_drupal6_multilanguage_1.patch | 6.97 KB | murz |
Comments
Comment #1
murzI create a patch for the HEAD version of pathauto that adds functionality to create equal aliases for multilanguage nodes, in my multilanguage site on Drupal 6 RC2 with subdomains it works well.
Please anybody do some test with it on your sites with other types of multilanguage or some code reviews for errors and bugs.
Comment #2
murzNew patch for HEAD version, fixed an SQL error with dublicated language field on bulk update.
Comment #3
gregglesMurz - this is really exciting. Thanks for your work here. I did some testing with the new i18n features in 6 and new that we would need some fixes in Pathauto to really make Pathauto work well for D6 but I wasn't sure where to work.
Can you describe why you added this line?
+ $type_where .= " OR `type` = '%s'";Could you provide a set of steps to test this module:
1. Install Drupal6
2. Enable German and Russion
3. Set your Pathauto pattern for pages to ?
4. Create a page with the title ?
...
Thanks!
Comment #4
murzWhen developing, I got some errors with this query, PHPMyAdmin shows me that 'type' is reserved sql-word and I try to escape it with quotes. But error was not in this place, but I forgot to remove this changes when creating patch. You can discard this .
Steps:
1. Install Drupal 6.
2. Enable 'Content translation' and 'Locale' modules.
3. Enable German and Russian languages.
4. Go to 'admin/settings/language/configure' url and set 'Language negotiation' to 'Domain name only'.
5. Go to edit language page (admin/settings/language/edit/de etc) and type full domains for non-native languages (http://de.mysite.com).
6. Create node and set language to english with pathauto alias like 'nodetitle.html' for example.
7. Go to 'Translate' tab and create translations in de and ru languages with same pathauto aliases.
8. Test your site with urls: http://mysite.com/nodetitle.html, http://de.mysite.com/nodetitle.html and http://ru.mysite.com/nodetitle.html - all must works!
That's all. Maybe I forgot something.
P.S. Sorry for my "English" :)
Comment #5
gregglesBetter component.
Also, your English is great. No need to apologize.
Comment #6
drewish commentedPatch doesn't apply cleanly any more... here's a re-roll minus the `type` parts. I also fixed a some of the PHPDoc to make it more consistent.
Comment #7
drewish commentedfixed some problems with the parameter order in calls to db_query_range().
Comment #8
drewish commentedgreggles said that one i was comfortable running the patch on my own server to mark this RTBC.. the path generation all seems correct but i'm now wishing i had a per node-language translation string.
Comment #9
gregglesThanks very much Murz and Drewish.
Comment #10
drewish commentedturns out i wasn't fixing those db_rewrite calls and i added a line of cruft.
Comment #11
gregglesThanks again. Applied to HEAD.
Comment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #13
spsingh commentedDear,
step 7 is not clear,
7. Go to 'Translate' tab and create translations in de and ru languages with same pathauto aliases.......
could u please tell me How I can enable 'Translation' Tab.
sriprakash.singh@hytechpro.com
Comment #14
drewish commentedspsingh, enable the content translation module
Comment #15
aliyayasir commentedI am using D6.22 and pathauto6.x-1.6 that is already pathced this bug
but i have still issues. i.e:
when i am saving a node into English the URL alias is perfect like www.example.com/en/content/[title-raw] but when i want to check the same node in Arabic it is showing drupal default www.example.com/ar/node/1234
Comment #16
dave reidPlease do not re-open issues that have been closed for three years.