[support] Problems with i18n module

Ivan Sergio Borgonovo mail at webthatworks.it
Thu Oct 30 15:16:35 UTC 2008


On Thu, 30 Oct 2008 15:14:55 +0100
"Sauro Cesaretti" <me at saurocesaretti.com> wrote:

> Hi all,
> 
> I've got my drupal installation up and running.
> I've followed the instructions to set up the Internationalization
> module (i18n)
> I need to build a multi-language site.
> I've put the language selection in a region I specifically created.
> Now, I've entered a page of content, called "
>  <http://www.example.com/en/conference>
> www.example.com/en/conference ", and I have translated that to all
> the other languages, saving it as "fr/conferences",
> "nl/conferences", etc. 
> Now, when I am in that page in English (but it is the same in all
> other languages), and I want to change the language I'm viewing
> it, it happens that the
> language selection link do not report "
> www.example.com/fr/conference
> " for the French, or "
> www.example.com/nl/conference
> " for Dutch, and so on, but rather "
> www.example.com/fr/node/33". 
> Thus, when I click on a link in the page in French (for example),
> obviously the links don't work, since I've used relative paths.

If I'm understanding right the "language selection" is i18n block
(the one with flags...).

I've experience with i18n just on 5.X. I think things may work a bit
differently and even better on 6.X.

I'd explicitly define url aliases for each page in each language.
Pathauto can cope quite well with multi-language sites... so if you
don't want your user to autonomously chose the path... use pathauto
so that urls will follow your policies.

If a page is a "static" node (no module code involved...) you
actually have to write the RIGHT url to other pages (including the
language prefix).
I'd say that if it is a "static" page... anyway you're "translating"
it so "translating" urls shouldn't be an issue.

If the page is a dynamic page... l() and url() do a pretty good job
prefixing the urls for you.
l(t('some link'), 'pippo/pluto'...

will link to it/pippo/pluto or en/pippo/pluto depending on the
language of the page you're viewing.

-- 
Ivan Sergio Borgonovo
http://www.webthatworks.it



More information about the support mailing list