Webpage with 2 languages

Hi all,

I have to create a new webpage for a company and the page has to be in two languages.

Spip allows me to associate corresponding articles, and on the public page, a link to the other language appears.

My questions are the following ones:

-> Can I do the same for rubriques (saying that this is translation of that rubrique). As for now, I just have one rubrique/section that is in one language, and the otherone that is in the other language.

- Is there a way to make the sommaire take over the language of the browser?

- The company logo is different depending on the language. Anyone knows if there is a way to make this depending on the language one and for all for the whole site (sommaire, rubrique AND article).

Thanks in advance

Simon

HI,

There is different ways to make multilangage website. I would say here
to make one langage rubrique with one logo, and another with another. than
the articles are linked together with their translations. You can make a loop
that can retrieve one article and use it to say that the rubriques are
translations of the others.... For the logo, another loop can retrieve
the langage than show the proper rubrique logo... For the browser
langage, i'm not so sure it's a good idea as i might like to browse a
site in english even if i am french speaking. So maybe a langage menu
sounds better...

Peg

2009/1/24 Simon Schneebeli <simon.schneebeli@okko.org>:

Hi all,

I have to create a new webpage for a company and the page has to be in two
languages.

Spip allows me to associate corresponding articles, and on the public page,
a link to the other language appears.

My questions are the following ones:

-> Can I do the same for rubriques (saying that this is translation of that
rubrique). As for now, I just have one rubrique/section that is in one
language, and the otherone that is in the other language.

- Is there a way to make the sommaire take over the language of the browser?

- The company logo is different depending on the language. Anyone knows if
there is a way to make this depending on the language one and for all for
the whole site (sommaire, rubrique AND article).

Thanks in advance

Simon
_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

--
----------

http://supergeante.net

Hi.

On Sat, Jan 24, 2009 at 7:02 PM, Peggy P. <peggy@rezo.net> wrote:

  • Is there a way to make the sommaire take over the language of the browser?

For the browser
langage, i’m not so sure it’s a good idea as i might like to browse a
site in english even if i am french speaking. So maybe a langage menu
sounds better…

That’s not so false. But if ever you really wish to do this, you can install plugin « Swiss Knife » which has an option to force the language according to the browser (and many very useful others :wink: )

I have to create a new webpage for a company and the page has to be in two
languages.

For what i know, < multi > tags also work in an article. Maybe you can proceed like this if your texts are short.

→ Can I do the same for rubriques (saying that this is translation of that
rubrique). As for now, I just have one rubrique/section that is in one
language, and the otherone that is in the other language.

Not really. I think you have to recreate the Rubriques yourself, referring to Peggy’s method :wink:

  • The company logo is different depending on the language. Anyone knows if
    there is a way to make this depending on the language one and for all for
    the whole site (sommaire, rubrique AND article).

I don’t really know. Maybe you can work on the LOGO_SITE_SPIP, looping it with a {lang} criterion somewhere. I didn’t really tried but maybe there’s something to do with this.

Thanks in advance

You’re welcome.

Etienne B.

Ok. Thanks for all the answers. I'll definitively try out the swiss-knife plugin to force the language according to the browser language.

Another way to do is to have different squelettes for the different languages (at least that's what I understand from http://www.spip.net/fr_article2128.html#fichiers_lang).

Now new question: Actually, the company's logo shows only on the head. The language of the rest of the page adapts automatically to the language of the article or rubrique. So I guess the easiest way would be to create a different inc_head.html depending on the language. Anyone has tried that out?

Simon

L'oiseau2nuit wrote:

Hi.

On Sat, Jan 24, 2009 at 7:02 PM, Peggy P. <peggy@rezo.net <mailto:peggy@rezo.net>> wrote:

    >
    > - Is there a way to make the sommaire take over the language of
    the browser?
    >
    For the browser
    langage, i'm not so sure it's a good idea as i might like to browse a
    site in english even if i am french speaking. So maybe a langage menu
    sounds better...

That's not so false. But if ever you really wish to do this, you can install plugin "Swiss Knife" which has an option to force the language according to the browser (and many very useful others :wink: )

    > I have to create a new webpage for a company and the page has
    to be in two
    > languages.

For what i know, < multi > tags also work in an article. Maybe you can proceed like this if your texts are short.

    >
    > -> Can I do the same for rubriques (saying that this is
    translation of that
    > rubrique). As for now, I just have one rubrique/section that is
    in one
    > language, and the otherone that is in the other language.

Not really. I think you have to recreate the Rubriques yourself, referring to Peggy's method :wink:

    > - The company logo is different depending on the language.
    Anyone knows if
    > there is a way to make this depending on the language one and
    for all for
    > the whole site (sommaire, rubrique AND article).
    >

I don't really know. Maybe you can work on the LOGO_SITE_SPIP, looping it with a {lang} criterion somewhere. I didn't really tried but maybe there's something to do with this.

    > Thanks in advance

You're welcome.

Etienne B.

Simon Schneebeli wrote:

Ok. Thanks for all the answers. I'll definitively try out the swiss-knife plugin to force the language according to the browser language.

Another way to do is to have different squelettes for the different languages (at least that's what I understand from http://www.spip.net/fr_article2128.html#fichiers_lang).

Now new question: Actually, the company's logo shows only on the head. The language of the rest of the page adapts automatically to the language of the article or rubrique. So I guess the easiest way would be to create a different inc_head.html depending on the language. Anyone has tried that out?

Actually, I'm speaking of inc-entete.html and not inc_head.html...

Simon

Simon

L'oiseau2nuit wrote:

Hi.

On Sat, Jan 24, 2009 at 7:02 PM, Peggy P. <peggy@rezo.net <mailto:peggy@rezo.net>> wrote:

    >
    > - Is there a way to make the sommaire take over the language of
    the browser?
    >
    For the browser
    langage, i'm not so sure it's a good idea as i might like to browse a
    site in english even if i am french speaking. So maybe a langage menu
    sounds better...

That's not so false. But if ever you really wish to do this, you can install plugin "Swiss Knife" which has an option to force the language according to the browser (and many very useful others :wink: )

    > I have to create a new webpage for a company and the page has
    to be in two
    > languages.

For what i know, < multi > tags also work in an article. Maybe you can proceed like this if your texts are short.

    >
    > -> Can I do the same for rubriques (saying that this is
    translation of that
    > rubrique). As for now, I just have one rubrique/section that is
    in one
    > language, and the otherone that is in the other language.

Not really. I think you have to recreate the Rubriques yourself, referring to Peggy's method :wink:

    > - The company logo is different depending on the language.
    Anyone knows if
    > there is a way to make this depending on the language one and
    for all for
    > the whole site (sommaire, rubrique AND article).
    >

I don't really know. Maybe you can work on the LOGO_SITE_SPIP, looping it with a {lang} criterion somewhere. I didn't really tried but maybe there's something to do with this.

    > Thanks in advance

You're welcome.

Etienne B.

_______________________________________________
spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Now new question: Actually, the company’s logo shows only on the head. The language of the rest of the page adapts automatically to the language of the article or rubrique. So I guess the easiest way would be to create a different inc_head.html depending on the language. Anyone has tried that out?

Actually, I’m speaking of inc-entete.html and not inc_head.html…

This might work for the rubriques/articles/ … but for the Sommaire i’m not sure.

Etienne B.

Simon

Simon

L’oiseau2nuit wrote:

Hi.

On Sat, Jan 24, 2009 at 7:02 PM, Peggy P. <peggy@rezo.net mailto:[peggy@rezo.net](mailto:peggy@rezo.net)> wrote:

  • Is there a way to make the sommaire take over the language of
    the browser?

For the browser
langage, i’m not so sure it’s a good idea as i might like to browse a
site in english even if i am french speaking. So maybe a langage menu
sounds better…

That’s not so false. But if ever you really wish to do this, you can install plugin « Swiss Knife » which has an option to force the language according to the browser (and many very useful others :wink: )

I have to create a new webpage for a company and the page has
to be in two
languages.

For what i know, < multi > tags also work in an article. Maybe you can proceed like this if your texts are short.

→ Can I do the same for rubriques (saying that this is
translation of that
rubrique). As for now, I just have one rubrique/section that is
in one
language, and the otherone that is in the other language.

Not really. I think you have to recreate the Rubriques yourself, referring to Peggy’s method :wink:

  • The company logo is different depending on the language.
    Anyone knows if
    there is a way to make this depending on the language one and
    for all for
    the whole site (sommaire, rubrique AND article).

I don’t really know. Maybe you can work on the LOGO_SITE_SPIP, looping it with a {lang} criterion somewhere. I didn’t really tried but maybe there’s something to do with this.

Thanks in advance

You’re welcome.

Etienne B.


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Hi,

On Sat, Jan 24, 2009 at 8:37 PM, Simon Schneebeli <simon.schneebeli@okko.org> wrote:

Now new question: Actually, the company’s logo shows only on the head. The language of the rest of the page adapts automatically to the language of the article or rubrique. So I guess the easiest way would be to create a different inc_head.html depending on the language. Anyone has tried that out?

Actually, I’m speaking of inc-entete.html and not inc_head.html…

If you want a logo for each language, what about using :

(you don’t use #LOGO_SITE_SPIP)

you can also use a translation string :
<:logo_of_my_site:>
with squelettes/lang/local_en.php :

<?php $GLOBALS[$GLOBALS['idx_lang']] = array( 'logo_of_my_site' => "My Logo" ); ?>

and an equivalent in squelettes/lang/local_es.php (or another language)

(the 2 letters correspond to your language code in ISO 639-2
– cf. the list here : http://www.loc.gov/standards/iso639-2/php/code_list.php)

.Gilles

Simon

Simon

L’oiseau2nuit wrote:

Hi.

On Sat, Jan 24, 2009 at 7:02 PM, Peggy P. <peggy@rezo.net mailto:[peggy@rezo.net](mailto:peggy@rezo.net)> wrote:

  • Is there a way to make the sommaire take over the language of
    the browser?

For the browser
langage, i’m not so sure it’s a good idea as i might like to browse a
site in english even if i am french speaking. So maybe a langage menu
sounds better…

That’s not so false. But if ever you really wish to do this, you can install plugin « Swiss Knife » which has an option to force the language according to the browser (and many very useful others :wink: )

I have to create a new webpage for a company and the page has
to be in two
languages.

For what i know, < multi > tags also work in an article. Maybe you can proceed like this if your texts are short.

→ Can I do the same for rubriques (saying that this is
translation of that
rubrique). As for now, I just have one rubrique/section that is
in one
language, and the otherone that is in the other language.

Not really. I think you have to recreate the Rubriques yourself, referring to Peggy’s method :wink:

  • The company logo is different depending on the language.
    Anyone knows if
    there is a way to make this depending on the language one and
    for all for
    the whole site (sommaire, rubrique AND article).

I don’t really know. Maybe you can work on the LOGO_SITE_SPIP, looping it with a {lang} criterion somewhere. I didn’t really tried but maybe there’s something to do with this.

Thanks in advance

You’re welcome.

Etienne B.


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Hi

I use a different logo for the site according to the language (actually a logo for the Latin languages and another one for the Arabic language). I uploaded the Latin logo as the normal Site's logo and the Arabic logo as the hovering logo and in inc-entete I put a condition:

[(#LANG|=={ar}|?{#LOGO_SITE_SPIP_SURVOL,#LOGO_SITE_SPIP_NORMAL})]

George

Gilles VINCENT wrote:

Hi,

On Sat, Jan 24, 2009 at 8:37 PM, Simon Schneebeli <simon.schneebeli@okko.org <mailto:simon.schneebeli@okko.org>> wrote:

        Now new question: Actually, the company's logo shows only on
        the head. The language of the rest of the page adapts
        automatically to the language of the article or rubrique. So I
        guess the easiest way would be to create a different
        inc_head.html depending on the language. Anyone has tried that
        out?

    Actually, I'm speaking of inc-entete.html and not inc_head.html...

If you want a logo for each language, what about using <multi> : <img src='IMG/png/<multi>MyLogo[fr]MonLogo</multi>.png' />
(you don't use #LOGO_SITE_SPIP)

you can also use a translation string :
<:logo_of_my_site:>
with squelettes/lang/local_en.php : <?php $GLOBALS[$GLOBALS['idx_lang']] = array( 'logo_of_my_site' => "<img src='IMG/png/myLogo.png' alt='My Logo' width='400' height='100' />" ); ?>
and an equivalent in squelettes/lang/local_es.php (or another language)
(the 2 letters correspond to your language code in ISO 639-2 -- cf. the list here : ISO 639-2 Language Code List - Codes for the representation of names of languages (Library of Congress))