Page 2 of 2

Re: Multilingual sites

Posted: Fri Nov 11, 2005 4:24 pm
by Piratos
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 ?)





[attachment deleted by admin]

Re: Multilingual sites

Posted: Mon Feb 20, 2006 11:54 am
by cyberman
katon wrote: Piratos, how do you handle content editing? You showed only the front end implementation.
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: Multilingual sites

Posted: Tue Mar 14, 2006 12:25 am
by katon
This is a screenshot of my solution:
http://forum.cmsmadesimple.org/index.ph ... 616.0.html
Please comment.

Re: Multilingual sites

Posted: Thu Jun 22, 2006 9:19 am
by krilin
:)
hi everybody!
I got a big issue for all of ya developpers. I'm actually developping a website in one of my projects, and in one of them we're using CMSMS.
the problem is we made it in one language "french" and need "english" also. I don't know if CMSMS can make it for me.

I heard about section headers, Pimenu: but I don't understand how it works...
Please send every information you find interesting for me?

;)

Re: Multilingual sites

Posted: Thu Jun 22, 2006 7:11 pm
by cyberman
There's a special multilang version of CMSms 0.12.1 - please look here

http://dev.cmsmadesimple.org/projects/multilang/