I have a multilingual site in 6x (en, de, fr). I want to configure l() function to link to full-path of node even under other languages.
Example:
I have some own nodes in german, and when I call mysite/de/mymodule links are listed as following:
mysite/de/my-node-title-1
mysite/de/my-another-node-title
but when I call mysite/fr/mymodule or just mysite/mymodule links are listes wirh node ids:
mysite/node/123
mysite/fr/node/123
I want to be able to return full-taxonomy-url-path even under different languages.
both mysite/mymodule and mysite/fr/mymodule must return:
mysite/de/my-node-title-1
mysite/de/my-another-node-title
mysite/de/any-other-node-alias-in-german
how can I do this without overwrite core l() function?
Comments
The issue still exists. I
The issue still exists. I think I didnt explain clear enaugh.
Easily the problem is:
Drupals l() function returns /de/path/to-alias or node/123
I have a custom module which lists different nodes under different languages.
If current language is "de" and current node's language is "de" Drupal returns /de/url-alias
but
for same node if current language is "fr" and current node's language is "de" Drupal returns /node/123
And this causes "duplicate content" for search engines.
I just want that Drupal returns full url alias without caring current user language:
example.com/node_lister and example.com/fr/node_lister and example.com/de/node_lister must list node urls like this:
/fr/a-node-in-french
/de/a-node-in-german
/an-other-in-english