|
List Info
Thread: Sites with multiple languages
|
|
| Sites with multiple languages |

|
2007-04-23 15:15:01 |
Hi,
I would like to hear how other users are handling websites
with multiple
languages. The situation is, that I am creating a website,
that needs to
support both danish and english. My own idea was to create
two output
channels, one for danish webpages and one for english
webpages. The
difference being that for the english output channel, the
paths start
with '/en'. The idea is, that the authors must write their
stories and
select the proper output channel.
My problem is, that I am creating the front page for the
website. I have
created the danish front page, which got the name
/index.html. Now I
can't create the english front page, because the name
/index.html is not
unique. I can't select the other output channel yet, because
the story
isn't created yet.
Shouls I instead create an 'en' category and re-create all
my categories
as a sub-category to this?
Hope you will share your ideas on this.
Regards,
Jesper
|
|
| Re: Sites with multiple languages |

|
2007-04-23 15:29:43 |
Hi Jesper.
What if you do this:
1. Create the English front page and give it a slug, which
will form
part of the URI
2. Select the English output channel in that story and
remove the Danish
one, which will make "en" part of the URI.
3. Remove the slug, so the URI becomes /en/index.html
Good luck,
Bret
Jesper K. Andersen wrote:
> Hi,
>
> I would like to hear how other users are handling
websites with multiple
> languages. The situation is, that I am creating a
website, that needs to
> support both danish and english. My own idea was to
create two output
> channels, one for danish webpages and one for english
webpages. The
> difference being that for the english output channel,
the paths start
> with '/en'. The idea is, that the authors must write
their stories and
> select the proper output channel.
>
> My problem is, that I am creating the front page for
the website. I have
> created the danish front page, which got the name
/index.html. Now I
> can't create the english front page, because the name
/index.html is not
> unique. I can't select the other output channel yet,
because the story
> isn't created yet.
>
> Shouls I instead create an 'en' category and re-create
all my categories
> as a sub-category to this?
>
> Hope you will share your ideas on this.
>
> Regards,
> Jesper
>
--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret pectopah.com
www.pectopah.com
|
|
| Re: Sites with multiple languages |

|
2007-04-24 04:34:54 |
Bret Dawson wrote:
> Hi Jesper.
>
> What if you do this:
>
> 1. Create the English front page and give it a slug,
which will form
> part of the URI
> 2. Select the English output channel in that story and
remove the Danish
> one, which will make "en" part of the URI.
> 3. Remove the slug, so the URI becomes /en/index.html
Thanks for your reply
It might work, but it seems more like a work-around way to
do it, rather
than the "right way". Also, I fear that I might
end up having to do this
each time I create a new article.
The problem with my own suggestion of creating a /en
category and
re-create all other categories as sub-categories is, that
the /news/
templates will not be used in the /en/news category, so I
would have to
clone all templates too, making it a nightmare to maintain.
I could go the
other way around, creating a /en subcategory for each
category, e.g.
/news/en for english articles, but it doesn't seem optimal
either.
Am I the only one using Bricolage for a multi-language
site?
> Good luck,
Thanks, I think I'm going to need it
/Jesper
|
|
| Re: Sites with multiple languages |

|
2007-04-24 04:50:49 |
On Mon, 23 Apr 2007, Jesper K. Andersen wrote:
> I would like to hear how other users are handling
websites with multiple
> languages. The situation is, that I am creating a
website, that needs to
> support both danish and english. My own idea was to
create two output
> channels, one for danish webpages and one for english
webpages. The
> difference being that for the english output channel,
the paths start
> with '/en'. The idea is, that the authors must write
their stories and
> select the proper output channel.
As long as the stories in different languages are considered
to be
separate stories, I think that's reasonable. You might do
other things
besides begin with "/en" (URI Prefix). As Mark
Jaroski has argued here,
we should probably (though we've never gotten around to it)
use Apache's content negotiation to serve pages:
http://httpd.apache.org/docs/1.3/content-negotiation.ht
ml
If you want that way, you might instead want the URI Suffix
to be "en.html"
instead of "html" for English, for example, or
"da.html" for Danish.
In principle, you might want there to be a single story
where different output channels would "format" or
"present"
the content in different languages; after all, it's the same
story,
just displayed differently (in different languages). That's
kind
of hard, though (even assuming identical sites for the
different
languages, which isn't necessarily what you want).
Originally
our system was set up with different element types for the
different languages: 'Paragraph - English', 'Paragraph -
French',
'Header - Spanish', etc. That might also work for your
case,
but for us it was unscalable for six languages (c.f. http://www.who.int ),
so we ended up hacking Bricolage a bit to do something
custom-made
for us (we have a concept of "output channel
groups", where the user
selects the language, and behind the scenes that selects all
the
corresponding output channels for that language).
Something that we (Bricolage team) had been working on
for "Bricolage 2.0"
was the concept of "Input Channels", which would
allow entering content
into these different channels, kind of like the inverse of
output channels, and handled similarly to how sites are
currently
handled in the UI.
http://bricolage.cc/docs/desig
n/ElementRevision/FunctionalSpec.html#input_channels
That's never made it into the code, though, as far as I
know
(didn't Marshall work on that two years ago for Summer of
Code?).
The idea is that you could switch the Input Channel to
'Danish',
then the content you're entering would be for that channel.
You wouldn't need separate 'Paragraph - Danish' elements;
instead, your templates could just obtain the information
based
on the input channel.
> My problem is, that I am creating the front page for
the website. I have
> created the danish front page, which got the name
/index.html. Now I
> can't create the english front page, because the name
/index.html is not
> unique. I can't select the other output channel yet,
because the story
> isn't created yet.
I'd put Danish in its own output channel too, but that's
just me.
The way we handle "defaulting" to English here is
with another
output channel that publishes meta-redirect files (again, I
think
that could instead be done through content negotiation).
Basically
the English web output channel has that redirect OC included
with it,
so a redirect file is published whenever the English story
is.
> Shouls I instead create an 'en' category and re-create
all my categories
> as a sub-category to this?
That doesn't really sound like a good idea to me, but..
|
|
| Re: Sites with multiple languages |

|
2007-04-24 04:54:03 |
On Tue, 24 Apr 2007, Jesper Andersen wrote:
> Am I the only one using Bricolage for a multi-language
site?
We do this in six languages (including Arabic,
right-to-left):
http://www.who.int/
and an even more extreme example (David did this one):
http://www.rfa.org/
|
|
| Re: Sites with multiple languages |

|
2007-04-24 10:19:03 |
Howdy again.
Sorry Jesper. I assumed that under your setup, each story
was only in a
single language.
We have a simple bilingual setup on the Dome site
(www.domeproductions.com) that creates an English web page
and a French
web page from each story. The setup is like Scott described,
with a
field for the English headline and a field for the French
headline, and
matching "body copy" fields.
The English and French output channels are both already
present in all
the story types, so the only thing staff have to remember is
to actually
write the copy in both languages.
I can see how it would get messy with more than two
languages, but it's
great for a situation like this one.
Best,
Bret
Scott Lanning wrote:
> On Mon, 23 Apr 2007, Jesper K. Andersen wrote:
>
>> I would like to hear how other users are handling
websites with multiple
>> languages. The situation is, that I am creating a
website, that needs to
>> support both danish and english. My own idea was to
create two output
>> channels, one for danish webpages and one for
english webpages. The
>> difference being that for the english output
channel, the paths start
>> with '/en'. The idea is, that the authors must
write their stories and
>> select the proper output channel.
>
>
> As long as the stories in different languages are
considered to be
> separate stories, I think that's reasonable. You might
do other things
> besides begin with "/en" (URI Prefix). As
Mark Jaroski has argued here,
> we should probably (though we've never gotten around to
it)
> use Apache's content negotiation to serve pages:
> http://httpd.apache.org/docs/1.3/content-negotiation.ht
ml
> If you want that way, you might instead want the URI
Suffix to be "en.html"
> instead of "html" for English, for example,
or "da.html" for Danish.
> In principle, you might want there to be a single
story
> where different output channels would
"format" or "present"
> the content in different languages; after all, it's the
same story,
> just displayed differently (in different languages).
That's kind
> of hard, though (even assuming identical sites for the
different
> languages, which isn't necessarily what you want).
Originally
> our system was set up with different element types for
the
> different languages: 'Paragraph - English', 'Paragraph
- French',
> 'Header - Spanish', etc. That might also work for your
case,
> but for us it was unscalable for six languages (c.f. http://www.who.int ),
> so we ended up hacking Bricolage a bit to do something
custom-made
> for us (we have a concept of "output channel
groups", where the user
> selects the language, and behind the scenes that
selects all the
> corresponding output channels for that language).
> Something that we (Bricolage team) had been working
on for "Bricolage
> 2.0"
> was the concept of "Input Channels", which
would allow entering content
> into these different channels, kind of like the inverse
of
> output channels, and handled similarly to how sites are
currently
> handled in the UI.
> http://bricolage.cc/docs/desig
n/ElementRevision/FunctionalSpec.html#input_channels
>
> That's never made it into the code, though, as far as I
know
> (didn't Marshall work on that two years ago for Summer
of Code?).
> The idea is that you could switch the Input Channel to
'Danish',
> then the content you're entering would be for that
channel.
> You wouldn't need separate 'Paragraph - Danish'
elements;
> instead, your templates could just obtain the
information based
> on the input channel.
>
>
>> My problem is, that I am creating the front page
for the website. I have
>> created the danish front page, which got the name
/index.html. Now I
>> can't create the english front page, because the
name /index.html is not
>> unique. I can't select the other output channel
yet, because the story
>> isn't created yet.
>
>
> I'd put Danish in its own output channel too, but
that's just me.
> The way we handle "defaulting" to English
here is with another
> output channel that publishes meta-redirect files
(again, I think
> that could instead be done through content
negotiation). Basically
> the English web output channel has that redirect OC
included with it,
> so a redirect file is published whenever the English
story is.
>
>
>> Shouls I instead create an 'en' category and
re-create all my categories
>> as a sub-category to this?
>
>
> That doesn't really sound like a good idea to me,
but..
>
--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret pectopah.com
www.pectopah.com
|
|
| Re: Sites with multiple languages |

|
2007-04-24 10:32:48 |
Bret Dawson wrote:
> Howdy again.
>
> Sorry Jesper. I assumed that under your setup, each
story was only in a
> single language.
My original idea was to have a story for each language and
enable the
correct output channel, but this sounds easier.
>
> We have a simple bilingual setup on the Dome site
> (www.domeproductions.com) that creates an English web
page and a French
> web page from each story. The setup is like Scott
described, with a
> field for the English headline and a field for the
French headline, and
> matching "body copy" fields.
This sounds like the easiest solution. I'm converting the
Eurocon 2007
website (www.eurocon2007.dk) to Bricolage, partly to make it
easier to
maintain (we edit the files by hand now) and partly as a
test case for a
larger site. The site will only have two languages and a
limited timespan,
so I think that this solution is the easiest to implement
right now.
Do you have two templates, an english and a french, for
each
element/category, that takes the text from the correct
element or is it
possible to find the "active" output channel and
select the proper
elements from that?
Thanks a lot.
/Jesper
|
|
| Re: Sites with multiple languages |

|
2007-04-24 10:59:06 |
Hi again.
> Do you have two templates, an english and a french, for
each
> element/category, that takes the text from the correct
element or is it
> possible to find the "active" output channel
and select the proper
> elements from that?
We have one template for each language for each story
element type. (So
there's an English press_release.mc and a French
press_release.mc, for
example.) For elements that handle images, there's only one
template (in
the English OC), and we just have the French output channel
include the
English one's templates.
You could do it all with a single set of templates, if you
like, though.
$burner->get_oc will tell you what output channel you're
on, and you can
take things from there. I kind of like having actual
distinct templates,
but maybe that's just habit.
If you're using the same layout for both languages, it might
be easier
to do it the way you describe.
Best,
Bret
--
Bret Dawson
Producer
Pectopah Productions Inc.
(416) 895-7635
bret pectopah.com
www.pectopah.com
|
|
| Re: Sites with multiple languages |

|
2007-04-24 11:01:20 |
On Tue, 24 Apr 2007, Jesper Andersen wrote:
> Do you have two templates, an english and a french, for
each
> element/category, that takes the text from the correct
element or is it
> possible to find the "active" output channel
and select the proper
> elements from that?
$oc = $burner->get_oc;
$lang = $oc->get_post_path;
# we had langs at the end of the URL: en, fr, es...
|
|
| Re: Sites with multiple languages |

|
2007-04-24 11:18:44 |
On Apr 24, 2007, at 11:19 AM, Bret Dawson wrote:
> The setup is like Scott described, with a field for the
English
> headline and a field for the French headline, and
matching "body
> copy" fields.
You could also make elements called English and French, and
put all
of the other content inside those. For instance:
Story
- English
- Headline
- Paragraph
- Paragraph
- Paragraph
- French
- Headline
- Paragraph
- Paragraph
- Paragraph
It might make it a bit harder to translate from one language
to
another, since you wouldn't be able to view both English and
French
in the UI at the same time (in 1.10; you can in trunk), but
it would
encapsulate things nicely and prevent you from having to
duplicate
all of the subelement types (Headline, Paragraph, etc.).
Note: I haven't used a setup like this, so I may be missing
something
important.
--
Marshall
|
|
|
|