Page 1 of 2

Site Multilangue

Posted: Sat Dec 17, 2005 11:53 am
by Marc
Bonjour,

Petite question : Comment peut-on réaliser un site multilangue ?
Quelles méthodes envisagées ?
- Créer autant de pages qu'il y a de langue ?
- Créer des blocs différents dans chaque page ?

Avez-vous des idées sur la question ?

Merci de votre contribution.

Re: Site Multilangue

Posted: Sat Dec 17, 2005 8:14 pm
by cyberman
That's possible with pimenu, a project on CMSmsforge. For instructions please read here - it's a german site but with babelfish or altavista the translation to french shouldn't be a problem  ;) .

Re: Site Multilangue

Posted: Sun Dec 18, 2005 7:32 am
by Marc
I see you understand the french language  :)

I study this solution, thank.

Re: Site Multilangue

Posted: Sun Dec 18, 2005 6:53 pm
by cyberman
Only a little bit  ;) ...

Re: Site Multilangue

Posted: Fri Feb 03, 2006 1:52 pm
by JF
It seems that the link you posted is no more available.
is there another way to get the module?

Cheers.

Re: Site Multilangue

Posted: Fri Feb 03, 2006 3:50 pm
by cyberman
Here you can found Pimenu and the german instructions are "saved" in this thread in german forum  ;) ...

Re: Site Multilangue

Posted: Mon Feb 20, 2006 12:34 am
by gogou
Bonjour Marc si vous avez trouvez une solution pour votre site multilangue, je suis très intéressé. Je n'ai pas compris les instructions en allemand. Il me faudrai quelque chose de simple avec les étapes à suivre pour avoir un site anglais français...

Merci d'avance :)

Re: Site Multilangue

Posted: Mon Feb 20, 2006 11:47 am
by cyberman
Hi gogou,

here comes a (english) translation - hope that helps ...
Multilingual Websites
Copyright by Piratos, 2005

The task is clear - there's content available in different languages . Now the visitor should get a menu in its language. That's simple to make with Pimenu.

Considerations

Contents are to be supplied in German and in English. German should be default language. Now is the question how it would be possible to steer the english menu. On the other side a superordinate order is needed within the admin area to separate german and english contents cleanly.

For this we are using section headers named German and English. But the section headers should not shown in menu. All contents of respective language are created below the section header belonging to it.

With Pimenu now it's possible to group these areas automatically switched by section header. The advantage is all content types can be used  inside the language groups (also further section headers).

But now we need a switch for decision-making too, which delivers its value from outside to Pimenu and can be consulted again in the template for evaluation.

Pimenu will do that for you. It evaluates a $_get variable named pimsw (= pimenuswitch) if available and sets a Smarty variable named $pimsw. Default is 0. Cause default language is german, all german menu entries gets a suffix &pimsw=0 in URL. All english menu entries gets &pimsw=1.

Now we take the default template pimenu.tpl, which represents CSSMENU and change it for our purposes:

Code: Select all

{if $pimsw eq 0}

<form action="index.php" method="get">
<input type="hidden" name="page" value="Suchergebnisse" />
<input type="hidden" name="pimsw" value="0" />
<input type="text" value="" maxlength="50" size="15" name="pisearch" id="query_string" />
<input type="submit" value="Suchen" id="buttonSearch" />
</form>

{else}

<form action="index.php" method="get">
<input type="hidden" name="page" value="Searchresults" />
<input type="hidden" name="pimsw" value="1" />
<input type="text" value="" maxlength="50" size="15" name="pisearch" id="query_string" />
<input type="submit" value="Search" id="buttonSearch" />
</form>

{/if}

<div id="listmenu">
<a href="index.php?page=Home&pimsw=0">Deutsch</a><br />
<a href="index.php?page=Homepage&pimsw=1">English</a><br />

<ul id="primary-nav-vert" class="cssmenu-vertical">

{foreach from=$rawmenu item=entry}
{if $entry->current_lang eq 0 and $pimsw eq 0}
{if $entry->show_in_menu eq 1}
{if $entry->depth neq 0}
{if $entry->next_level > $entry->depth}
{if $entry->type <>'separator'}

<li class="menuparent"><a href="{$entry->url}&pimsw=0"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a><ul>

{else}

<li class="separator"><ul>

{/if}
{/if}

{if $entry->next_level == $entry->depth}
{if $entry->type <>'separator'}

<li><a href="{$entry->url}&pimsw=0"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a></li>

{else}

<li class="separator"><li>

{/if}
{/if}

{if $entry->next_level < $entry->depth}
{if $entry->next_level > 0}
{if $entry->type <>'separator'}

<li><a href="{$entry->url}&pimsw=0"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a></li></ul></li>

{else}

<li class="separator"></li></ul></li>

{/if}

{else}

{if $entry->type <>'separator'}

<li><a href="{$entry->url}&pimsw=0"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a>

{else}

<li class="separator">

{/if}
{/if}
{/if}

{else}

{$entry->trenner}

{/if}
{/if}
{/if}

{if $entry->current_lang eq 1 and $pimsw eq 1}
{if $entry->show_in_menu eq 1}
{if $entry->depth neq 0}
{if $entry->next_level > $entry->depth}
{if $entry->type <>'separator'}

<li class="menuparent"><a href="{$entry->url}&pimsw=1"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a><ul>

{else}

<li class="separator"><ul>

{/if}
{/if}

{if $entry->next_level == $entry->depth}
{if $entry->type <>'separator'}

<li><a href="{$entry->url}&pimsw=1"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a></li>

{else}

<li class="separator"><li>

{/if}
{/if}

{if $entry->next_level < $entry->depth}
{if $entry->next_level > 0}
{if $entry->type <>'separator'}

<li><a href="{$entry->url}&pimsw=1"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a></li></ul></li>

{else}

<li class="separator"></li></ul></li>

{/if}

{else}

{if $entry->type <>'separator'}

<li><a href="{$entry->url}&pimsw=1"{if $entry->iscurrent eq 1}class="currentpage"{/if}>{$entry->menutext}</a>

{else}

<li class="separator">

{/if}
{/if}
{/if}

{else}

{$entry->trenner}

{/if}
{/if}
{/if}

{/foreach}

</div>
Now the work is done.

Actually only the part within the loop was duplicated and few changes registered. If you need more languages, please make copies of the appropriate parts and register the values.

Re: Site Multilangue

Posted: Tue Feb 21, 2006 3:05 pm
by gogou
thanks you :) I'm sure it is going to help. I'll post questions if needed.

Re: Site Multilangue

Posted: Wed Feb 22, 2006 1:25 pm
by gogou
hello, I've tried to use this translation, but some stuff are not clear imo.
Well i've made the two section headers, now what do I've to do? (I'm also new to CMSMS).
Any clues? Or can someone help me with a detailled how to?

Thanks in advancd :)

Re: Site Multilangue

Posted: Wed Feb 22, 2006 8:33 pm
by cyberman
Hi Pat,
Patricia wrote: conanis
what means that?

My online translator don't know this word  ::) ...

PS: Piratos has not stopped his development for CMSms - there are new versions for some plugins on his site available ...

Re: Site Multilangue

Posted: Wed Feb 22, 2006 10:55 pm
by cyberman
Patricia wrote: lol, that's a typo, an inversion, it's not "conanis", but "connait".
;D
ok, new version on Piratos site. what's the url again?
Only new versions of some other plugins, not pimenu

http://piratos.byethost33.com

But's a german only site. There you must go to forum and register. Then you can see the download board.

Re: Site Multilangue

Posted: Wed Feb 22, 2006 10:56 pm
by cyberman
Hi gogou,
gogou wrote: Or can someone help me with a detailled how to?
Please give me some time to translate  :) ...

Re: Site Multilangue

Posted: Thu Mar 02, 2006 12:42 am
by gogou
Thanks a lot your support. If i'm able to make it multi with your help I will translate the how to in french.

Like "How to made cmsmadesimple multilanguage for noob like me" ^_^

Best regards gogou

Re: Site Multilangue

Posted: Thu Mar 02, 2006 11:06 pm
by gogou
Je pensait avoir posté :s

I've made the two section header, english and french. But now what do I ve to do?

It is written: "It evaluates a $_get variable named pimsw (= pimenuswitch) if available and sets a Smarty variable named $pimsw. Default is 0.".
- ok but where do I set the smarty variable?

Then "now we take the default template pimenu.tpl, which represents CSSMENU and change it for our purpose".
- ok but where do I have to put the pimenu (wich directory) and how ccan i install it. Thenthe stuff I've to change, where do I change them and do I ve to keep old stuff in the tpl?

Sorry but I'm quite lost, I don't know how it work.

Regards Gogou


EDIT, from piratos: (thanks for your help)

Ok

I use Sectionheaders

Deutsch

English

Stop

These Sectionsheaders should be declared as not visible in the menu.

The Sectionheader Deutsch and English are my Headlines if i edit contents in Deutsch or English.

All Contents in Deutsch are under Sectionheader Deutsch.

All Contents in English are under Sectionheader English.

The Sectionheader Stop is for the pimenu (Name it to what you want).

Pimenu can now divide the Contents between Deutsch and English as one Block Deutsch.

Between English and Stop it is the Block English.

That is all. The rest i make with a Template and pimenu .

If you know this  it is very simple to find the line to edit new contents.

If you have more Languages you add some new Sectionhedders.

I explained that in the pdf handbook (is there anybody who translate it ?)