Hi,
Trying to get the i18n module doing what I want it to do, I stumbled upon pretty inconsequent behaviour. Well, that's what I think. I know something like this has been reported in post http://drupal.org/node/21898, but that was for version cvs and very, very briefly. The post has been answered with a suggestion, but no comment has been given ever since.
As I think I'm struggling with the same problem, I'll give it another try - also because I think that (given the fact that I'm right) it can drive people mad. Watch this, I'll try carefully to describe what happens in my situation.
Concept
I made a site (www.newoceans.nl), with three languages:
- en turned off: the original drupal language
- nl turned on: my site's specific dutch language, turned on (and default)
- en-local turned on: my site's specific english language, turned on
I made an extra english language, as I do not want to use all drupal's predefined strings the way they are predefined; i.e. I want to use "by" instead of "Submitted by" or something.
I have a weblog item about work in progress; it's translated, so it has two nodes:
- node 38: Werk in uitvoering (nl)
- node 69: Work in progress (en-local)
Well, let's create three different states now, and see what happens. First state is without using URL aliases. Second state is with using URL aliases, but without using language prefixes in them. Third state is with using URL aliases, and with using language prefixes in them. For every state I will look at node 38 in the dutch site (which is default), and see what the english language icons will tell me, both under the node itself and in the language block. There we go!
Without URL aliases
Well, there are no URL aliases to be defined. And this is the result:
- english icon under node:
http://www.newoceans.nl/nl/node/69
This refers to the english node in an overall dutch site - english icon in the block:
http://www.newoceans.nl/en-local/node/69
This refers to the english node in an overall english site
With URL aliases, without language prefix
The URL aliases defined are:
- for node 38: actueel/weblog/werk-in-uitvoering
- for node 69: journal/blog/work-in-progress
And this is the result:
- english icon under node:
http://www.newoceans.nl/nl/journal/blog/work-in-progress
This refers to the english node in an overall dutch site - english icon in the block:
http://www.newoceans.nl/en-local/actueel/weblog/werk-in-uitvoering
This refers to the dutch node in an overall english site
With URL aliases, with language prefix
The URL aliases defined are:
- for node 38: nl/actueel/weblog/werk-in-uitvoering
- for node 69: en-local/journal/blog/work-in-progress
And this is the result:
- english icon under node:
http://www.newoceans.nl/en-local/journal/blog/work-in-progress
This refers to the english node in an overall english site - english icon in the block:
http://www.newoceans.nl/en-local/actueel/weblog/werk-in-uitvoering
This refers to the dutch node in an overall english site
Summary
For three different states of one situation, the english icon under the node succesively refers to:
- state 1 - english node in an overall dutch site
- state 2 - english node in an overall dutch site
- state 3 - english node in an overall english site
For three different states of one situation, the english icon in the block succesively refers to:
- state 1 - english node in an overall english site
- state 2 - dutch node in an overall english site
- state 3 - dutch node in an overall english site
This is not very consequent... And I think people won't understand the idea. Or may be I don't?
Questions (finally ;-D )
First, and of course: is this a bug? Or am I doing something wrong?
Second: I want the english icon in the block to use URL aliases and refer to the english node in an overall english site. I cannot find a way to achieve this. How should it be done?
Third: I want the english icon under the node to disappear. How should this be done?
Hope this post was clear enough to understand what I mean and may be it can help you to solve the problem. If there is one, of course...
Comments
Comment #1
Marc Bijl commentedOh, and fourth ;-)
I don't have any clue what path will be used by robots, crawlers, search engines, or whatsoever...
Comment #2
jose reyero commentedWell, isnt that great, that you can change the behaviour playing with aliasing? ;-)
Anyway this is the best bug report I've ever got, so I'll look at it, but possibly when updating for 4.7 because its quite complex problem -I know path aliasing with languages has to be fully reworked-. Then I'll try to backport the solution if any.
Comment #3
Marc Bijl commentedThanks for the compliment and reply; it's nice to know that the maintainer of this great module has seen the message and knows what it's all about. I'm looking forward to what can be done. Success with it!
Comment #4
jose reyero commentedComment #5
Marc Bijl commentedSolution for correct linking from language block can be found here:
- http://drupal.org/node/22345
Comment #6
jose reyero commentedThis i18n+path aliasing is a very complex issue and has been fixed in 4.7. Won't fix for 4.6