Snippet: Easy Multilanguage Link

crnogorac081

Web developer

FrankH

The WB Code snippet Easy Multilanguage Link is useful on multilanguage sites only. It provides links to pages in other languages with the same content as the current page.
It is not necessary that all pages exist in all languages or that the page trees of different languages have the same structure.

How it works:

It is necessary to replace some kernel files, because we need a new field (I called it Page Code) in the page settings. For all pages with the same content you enter the same Page Code (you can also call it keyword).

The snippet will show the languages of all pages with the same Page Code as link menue.

There are two special Page Codes:

    * home is the home page of a language. It is used when no page with the current page code is available for a language.
    * none does switch off the language menu for the current page. This might be useful within a multipage form, for instance.

Add the following line to your template:

<?php easymultilang_menu(); ?>

The file HowTo.txt explains the necessary steps.

Home page of the snippet on AMASP: http://www.websitebakers.com/pages/code-snippets/various/easy-multilanguage-link.php
Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf