[support] I18n questions and troubles

Ivan Sergio Borgonovo mail at webthatworks.it
Mon Apr 28 09:23:22 UTC 2008


On Mon, 28 Apr 2008 10:16:59 +0200
"Pierre <pounard> Rineau" <pounard at processus.org> wrote:

> Hello,
> 
> I have some basic questions about i18n module, hard to explain, so
> there is a basic use case :

> I have two languages, french (fr) and spanish (es);
> I have to translate every node to both language (so I use the
> "translations" tab to create and link nodes from both languages),;
> 
> I have only one big menu, which is translation enabled (so one
> entry for both language, but translated);
> 
> Let's say I have a french node: "node/XX";
> and its translation in spanish: "node/YY".
> 
> The question is, when I go to path "fr/node/XX", my french node is
> displayed, but when I switch to spanish, cliking the spanish
> language switch link, my new path is "es/node/XX", does the i18n
> module automatically switch the displayed node to "node/YY", or
> does I always have to manually switch the path to "es/node/YY" ?
> 
> The problem behind this is my menu is the same in french and
> spanish, so when I click on a spanish entry from the menu, the path
> will be the french node's path, but prefixed with "es/", but my
> french node is always displayed, which is not what I want...

What I did to recycle menu was to use an agnostic menu and locale
that just translate the text.
i18n take care of the language prefix in the path.
The only draw back is the overall path is not translated.

So you've a menu entry that is eg.
d1/documents (path in the menu entry) and Documents as text
i18n will prefix the path with the language
localisation will translate Documents into eg. Documentos[1]

Then you write the es and fr version behind d1/documents with
es/documents and fr/documents path.

When you're in es mode the menu will take you to
es/documents and the menu text (provided you translated it with
localisation) will show Documentos.
When you're in fr mode the menu will take you to fr/documents and the
menu text will show Documents[2].

What I haven't been able to achieve is having the path translated
too... so that Documentos will take you to es/documentos and
Documents will take you to fr/documents.
I think it is achievable but I never dig into it enough.
In my use case users tend to switch between language if they are not
finding what they are looking for, since not all translation have all
the pages.
So I provide different taxonomies for different languages that are
always visible and I use the above trick just for primary links so I
do have taxonomies translated... even if users can't switch between
taxonomies of different levels... but they can try to switch between
articles, and articles provide a bridge between taxonomies.
It would be nice to have a bridge between taxonomies with a fall back
system that takes you to the nearest point between languages, since
in my use case not all languages follow the same dev path it may
happen that some leaves of a taxonomy in one language are missing.

It depends on your use case... if you feel that path are important
you may put more effort into actually translating and mapping
everything.


[1] I just saw an Italian advertising that says that it is not enough
to add an s to every Italian word to make it Spanish, but I think at
least this one is correct
[2] this time I had to check with Google.

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



More information about the support mailing list