feel free to keep it strictly simple...
Easymultilanguage: switch between pages

The Easy Multilanguage Link (thanks to FrankH)  is available and useful on multilanguage sites only.

To activate this function you have to enable the 'page language' in the settings.

The funtion provides links to pages in other languages with the same content as the current page.

Notice: it is not necessary that all pages exist in all languages or that the page trees of different languages have the same structure.

 

Usage

  1. When you have pages with the same content in different languages, set the same page code for each page in its settings. The page code may be any arbitrary string.
  2. Page codes with special meaning are:
    • home - home page of a language (is used when no page with the current page code is available for a language)
    • none - switch off the language menu
  3. Add the following line to your template where the flag menu should appear:
     <?php echo easymultilang_menu(); ?>

 

 This site uses Easy Multilanguage Link: von Brauck Stiftung.

 

Use custom flags

If you want to use custom flags upload your flags as png-file via ftp to

/modules/lib_lepton/flags/custom

and you are done.

Please keep in mind that flags must be named as language files in small letters, for example es.png or de.png.

 

 

Extended function

From LEPTON 3.0.2 this function is extendend.

If you use

 <?php echo easymultilang_menu(true); ?>

you wll receive an array as a result that gives you a language key and te matching text

for example

 Array ( [EN] => Array ( [value] => [language] => English ) ) 

 

With this call you can style nearly every frontend output in your frontend-template.

 

 

Custom Output

Starting with LEPTON 4.4.0 customize output never had been easier.

Simply create a folder "easymultilang" in your frontend_template/frontend and insert a file called "menu.lte".

Customize your html to whatever you want.

Download example of menu.lte for own use.