Hi Christoph,
I consider myself a LinguaPlone newbie. At least I haven't
written
any LinguaPlone code. So you should read these remarks with
some
suspicion, but I hope they are useful anyway.
BTW, I use the latest LinguaPlone from the svn trunk, in
combination
with Plone 2.5.
Christoph Anton Mitterer, on 2006-08-13:
> does en_US mean American English or is it just English
with content
> for United States?
It means American English. So if you have a page in two
languages,
say en_US and en_GB, the only difference could (should?) be
simply
spelling or choice of words. One possible use of this is of
course to
provide really different content. You could have a page
with quotes
where the en_US one has quotes from George Washington and
the en_GB
one has quotes from Winston Churchill.
But the basic difference is still the used language. If you
use it to
represent different content, you have to make sure that you
don't
unnecessarily hide American content for the British. A
Plone
developer from Britain who wants to travel to the Plone
Conference in
America and visits a the website of a world wide hotel chain
will
really want to see the American hotels and so the American
content.
If his browser is set to en_GB and this means he only gets
to see
British hotels then you that website did something wrong in
my
opinion.
It depends on your use case whether you can (ab)use the
language
setting to provide localized content.
Well, maybe for the hotel example you could show all hotels
no matter
what the language setting. But in the en_US document you
could list
prices of hotel rooms in American dollars and in the en_GB
you could
list them in English pounds.
> With the following questions I suppose that my idea, of
how all this
> is indendet to be used, is correct.
(...)
> 2) One thing that I don't like is that Plone creates
new objects for
> each translation. If I have a document called
contact,... it does
> not contain all different languages, but for each new
translation a
> new document is created e.g. contact-de-at.
> This is bad I think,.. first of all it will make
problems with links
> to that document (e.g. internal links from other docs)
I think the way LinguaPlone makes this work is: you just
link to
whatever language you want and LinguaPlone will figure out
which
language is actually shown to the user. LinguaPlone knows
which pages
are translations of each other, even if their IDs are very
different.
So I *think* it goes fine.
> and it does a
> little bit discriminate the contact-*,... contact
itself may be
> written in en,.. and translations added as contact-de,
> contact-fr,... so it think in this example it would be
> discriminating that the "main" contact
document is in English.
Language is a touchy issue for some people so this might be
a point.
But I think it is best to have one and only one original
document and
let the translations flow only one way. If you change the
English
version and independently someone else changes the German
version and
yet another person changes the French translation then that
is a
recipe for trouble.
If you translate English to Chinese and then translate that
back again
you could end up with something like this:
http://winterson.com/2005/06/episode-iii-backstr
oke-of-west.html
> Wouldn't it be better to have one common uri for all
the different
> language versions, and just have something like
"?lang=de_AT" added
> to it. The later is already done in Plon,.. but
additionally to
> different document names.
LinguaPlone let's you add "?set_language=en" to
get to another
translation. Or actually I think that part of the url just
sets a
cookie. You reach the other translation because of the rest
of the
url. For example if I translate the front page to Dutch
then the two
flags at that page get the following links:
http://127.0.0.1:8080/mvr/front-page/view?set_language=
en
and:
http://127.0.0.1:8080/mvr/front-page-nl/view?set_lan
guage=nl
Well, I'm cheating a bit here to make it clearer. That
last one
actually has an id of 'front-page-1'. If I had really
translated that
title then it would have gotten an id of 'voorpagina'.
LinguaPlone
still knows that they belong together.
If I would now add German as allowed language, without
translating the
front page yet, then I think there would also appear a
German flag on
the front page, which would link to the default page and
which would
at the same time set the language cookie to German:
http://127.0.0.1:8080/mvr/front-page/view?set_language=
de
At that point you would see the content of the front page in
the
default English, but the rest of the page (the Plone UI)
would be in
German.
Hm, not sure if that answers your question, but I hope this
makes the
current situation clearer.
> 3) How should the language/localisation be choosen for
a visitor?
> a) "?language=foo" attached to the uri
> b) Users manual choice: The language icon he clicks in
the website (thus cookies)
> c) Users manual choice: What he selects in his personal
profile
> d) What the user has set up in his browser
> e) Site default
That looks like the logical order yes: if a) is true then
use that
language, else if b) is true, use that language, etcetera.
But: option a) doesn't seem valid. AFAIK 'language=x' is
not used in
LinguaPlone. It doesn't have any effect when I try it in
the browser.
Like mentioned before, you can use set_language instead,
like clicking
on the flags does for you. So option a) is thrown away.
And then
Plone tries b, c, d, and e, in that order.
> 4) What general scenarios can I imagine for a website
with mutlilingual content?
> In nearly every case,.. not all content will be
available in all languages.
> Imagine a site with e.g. support for 6 or more
langugages,... if someone adds a
> newsitem it might be too unimportant to translate it...
> Ok,.. the site admin might choose between the following
solutions:
> a) When a user chooses a language (see 3a-3d) he sees
only documents in this
> language,... meaning: if the document he requests is
not available in the
> language,.. he sees an error (and perhaps a list of the
available languages) AND
> _even_ navigation/menu and so on are influenced by this
setting,.. so they only
> show content of the selescted language and hide every
thing else.
>=> as far as I can see,.. this is what LinguaPlone
currently does, right?
Right. But in the Plone Control Panel, in Language Settings
see the
Content Control Settings with option 2: Allow content
language
fallback if the implementation supports it.
Also take a look at the Negotiation Scheme on that page.
Those two
groups of settings give you a lot of flexibility in how
LinguaPlone
functions on your site.
> b) (The solution that is the best in my opinion):
> If the users opens a specific document/image/etc: If
(and only if) the user
> selected a language via 3a) it should be tried if the
document is available in
> that language,... if not,.. then if (and only if) he
selected a language via
> 3b,.. and so on.
That seems the default.
> If the document is not even available in the site
default language (3e),.. the
> users should get an errror and a list which available
languages.
So for example there is a document in German only, you
request it in
Dutch and the default language for the site is English?
Then you
would want an error and on that error page link to the
German version?
Yes, that would be handy.
Hey, I just tried that out and you know what? This is
actually
already there. I didn't know that. I added
Afrikaans as allowed
language, went to the front page, clicked the South African
flag there
and got an error page saying that the translation is not
available and
that I can instead choose English and Dutch:
Indien jy hierdie dokument wil lees, sal jy een van
die
volgende tale moet kies:
* English
* Nederlands
Whether it works like this or not may depend on your
settings in the
plone control panel.
I haven't experimented with the country-specific language
variants
like de_AT, so I won't comment on the rest of your
questions.
set_language=en: I hope this helps.
set_language=de: Hoffentlich hilft dies.
set_language=nl: Hopelijk helpt dit.
--
Maurits van Rees | http://maurits.vanrees.or
g/ [NL]
Work | http://zestsoftware.nl/
GnuPG key | http://maur
its.vanrees.org/var/gpgkey.asc
"Do only what only you can do." --- Edsger Wybe
Dijkstra
------------------------------------------------------------
-------------
Using Tomcat but need to do more? Need to support web
services, security?
Get stuff done quickly with pre-integrated technology to
make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on
Apache Geronimo
http://sel.as-us.falkag.net/
sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Plone-i18n mailing list
Plone-i18n lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plone-i18n
a>
|