Snippet: Easy Multilanguage Link

crnogorac081

Hi Chris,

here is what pagecode is for:
Quote from: crnogorac081 on November 10, 2009, 03:32:52 PM
Hi,

First - Just dont forget to install the patch files..

No, as it is mentioned in first post, you do not need to have same pages on different languages.

For example:

EN                                ES
Home    <home>           Home es
Page 1    <page1>         Pagina 1
Page 2     <seccond>     Paggina 2
Page 3

In <> is page code which needs to be inpuded in page settings. In this example, you see that Page 3 has no match page on spanish. When you click on flag image while you are on that page, you will be redirected to page where you set "home" page code.

Cheers



I used  Easy Multilanguage Link Snippet, and not Multilingual Switcher so I dont know why pagecodes resets.

I had no problems with Easy Multilanguage Link Snippet, it works perfectly so far.
Web developer

jacobi22

#51
Quote from: freeSbee on March 08, 2014, 03:12:19 PMI have used the WebsiteBaker Multilingual Switcher 1.6.5
QuoteAfter klicking the link, the previously done assignment is gone. I do not think this is the originally intended functionality. Does anybody know what this link is intended to do?

if you install the module on a working system (maybe with 20 pages), the install progress update the new database field "page-code" with the page-ID from every page
But if you add a new page, the system set a 0 (zero) to this database field, you have to go to the page settings and select a target page from the main language tree

when you start a project with a installed multi lingual module from the begin and add all your pages, every page has the page code "0", but the script doenst work with a target page-id == 0, it needs the real page-id from the target page or the page-ID from this page self

The Link "page-code" set all this page-code's from zero to the page-id from every page, so that multi lingual can work without problems
but.... its also a RESET - all previously settings are gone without warning!

its helpfull, if you need a fast solution for a bigger system with many pages and sometime the Reset is a good solution, but not everytime..

in the next module version in wb 2.8.4 this link will only set the page-code-fields with a 0 and dont touch my settings there

freeSbee

Hi

I have used the WebsiteBaker Multilingual Switcher 1.6.5 and it works perfect.
http://www.websitebaker.org/forum/index.php/topic,14037.msg157022.html#msg157022

I have made the language assignment manually. But the snippet also provides  a link called "Pagecode" (only existing if the snippet has been installed).
Goto: Pages > Page settings > Link "Pagecode"

After klicking the link, the previously done assignment is gone. I do not think this is the originally intended functionality. Does anybody know what this link is intended to do?

Thanks and regards
Christoph

Luisehahne

QuoteRequires patch in some kernel files for additional column page_code in the pages table,

And all is gone by next Release.

Dietmar
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

crnogorac081

Hi,

if you see Snippets' page at AMASP: http://www.websitebakers.com/pages/code-snippets/various/easy-multilanguage-link.php

You have marked red: Requires:    Requires patch in some kernel files for additional column page_code in the pages table, see HowTo.txt

There are some files (from the patch2.8.0 folder in zipped snippet) which needs to be replaced with core files..

cheers
Web developer

Luisehahne

try this snippet. This snippet is the same that runs on WebsiteBaker homepage. I hope somebody helps me to write a tutorial in German and English.

Call in Template is

<?php if(function_exists('language_menu')){ language_menu('png'); } ?>

Dietmar

[gelöscht durch Administrator]
Note: Once the code has been generated, it is easy to debug. It's not a bug, it's a feature!

xia

I don't have "Page Code"

[gelöscht durch Administrator]

crnogorac081

Go to ES page -> go to settings, then in the list where title, description, language etc.. is , there is a Page Code input field. Type same word on ES and Page 2 and it will work..
Web developer

xia

Thanks!
I don't know what you want say about "set page code"

crnogorac081

Hi,

go to Pages -> Settings for ES and set page code same as for Page2

cheers
Web developer

xia

I Have a menu:
EN               ES
Home           Home es
Page 1          Pagina 1
Page 2          Paggina 2
Page 3
When I click to ES, open Page2 not home

pivey


aesteves

For anybody with this problem (ordering the language menu - flags, text, whatever you chose), I've solved it by, in the file "modules/easymultilang/include.php", replacing the line that orders the languages

ksort($langarr);

with this one (for my case):

$langarr = array('PT'=>$langarr['PT'], 'EN'=>$langarr['EN'], 'ES'=>$langarr['ES'], 'FR'=>$langarr['FR']);

you can change it with different languages or different order.

cheers

pivey

Has anyone manage to change the code of flags order? It would be helpful to order according to backend language tree instead of alphabetical order, like it is now.

crnogorac081

not sure, never tested that, so I use standard letters :)
Web developer

pivey

Yes, did define "home" as default page to show up when no similar page exists.
So i have to asign each page with a unique "Page Code" , same in each language. Right?

That's what i did... and works like a charm.

By the way: what is the languages definition in admin good for by default? Does it handle the encoding?

crnogorac081

Quote from: pivey on December 20, 2010, 12:06:22 PM
thx crnogorac081,

of course.. i had all pages in English language. It works fine now.
Thx again.

Note that you can set page code = home    for default page when no page on different language is selected via page code.
Web developer

pivey

thx crnogorac081,

of course.. i had all pages in English language. It works fine now.
Thx again.

crnogorac081

This snippet doesnt to that. It can only transfer you to the page you select with another language.

I am not sure what are you trying to do. Can you describe on an example ?
Web developer

snark

Is it possible to make this menu do clever things like showmenu2 can, i mean fi:

- start at x steps down the root
- only show up till x levels
- automaticallcy add à character to THE menu title.   ( > [MENU_TITLE] )

Etc

crnogorac081

Maybe all your pages are on english, check page language on page settings. Also check fill in page code , for example:

startsite => fill in "home"
start      => also fill in "home"

if it doesnt work, you can  send me a link to your site so I can take a look

Web developer

pivey

Nice module.. thx

Have installed it as instructed, (tested with 2 languages EN + DE)
Now.. Only English flag shows up with text "English", not clickable at all.

Any thoughts?

Note: I have made the structure of the website with default multilanguage functionality of WB

Version 2.8.1
Revision 1287

FrankH

Before writing, you should have took a look into the directory /modules/easymultilang/patch2.8.0
May be this directory contains subdirectories with names, which are already there under your WB installation?
So what is your problem?
Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf

babsy

sorry, but where do you mean that we should copy the files to:

from /modules/easymultilang/patch2.8.0
to the directory with the same name under your WB path ??

i don´t know where you mean, when you say:
to the directory with the same name under your WB path ??
?

i have installed it, and now all the pages show up, both english and swedish? but i gues thats because im not finished with this moving/deleting files! :)

FrankH

Quote from: crnogorac081 on November 09, 2009, 08:53:07 PM

I understand that it is a little non usual, but is it possible, if you would do any further development for this module, that flags (like on my screenshoot ) use order from menu tree ?

2. My defult language in backend is set to ME, so I would like first flag to be ME, and not EN (like on my screenshoot ) , is it possible ? Does the snippet use alphabet order to set order for flags ?


Hi Ivan,

Sure it is possible, but needs some work, I assume. Currently I am finnishing the mpform help project with 40 pages of documentation, afterwards there is already another large task, so I won't have time during the next months for this snippet.

Regarding the last question: I think currently we have an unsorted list, but better look into the source code.
Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf