Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 01:01:04 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155504 Posts in 21710 Topics by 7736 Members
Latest Member: deenangle
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: Snippet: Easy Multilanguage Link  (Read 8697 times)
renjithtk07

Offline Offline

Posts: 1


« Reply #25 on: November 10, 2009, 10:00:00 AM »

Hi,

I am trying to add the multilanguage to my site. I have installed the multilanguage module. I have added the code to display the multilanguage icons to the index.php page.

My site have 4 pages in english. Now do I need to create another four pages for spanish? I am not getting a clear idea about how I need to set it. Could you please provide a basic documentation by which a user who is not so much familiar with website baker and multilanguage can get a better idea to use it.

Thanking you..
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #26 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

Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
FrankH

Offline Offline

Posts: 735


WWW
« Reply #27 on: November 10, 2009, 05:31:58 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.
Logged

Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf
babsy

Offline Offline

Posts: 322


« Reply #28 on: February 10, 2010, 10:59:37 AM »

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! Smiley
Logged
FrankH

Offline Offline

Posts: 735


WWW
« Reply #29 on: November 16, 2010, 05:03:59 PM »

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?
Logged

Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf
pivey

Offline Offline

Posts: 33


« Reply #30 on: December 16, 2010, 10:00:22 AM »

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
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #31 on: December 17, 2010, 12:45:46 AM »

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

Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
snark
Guest
« Reply #32 on: December 18, 2010, 12:08:52 AM »

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
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #33 on: December 18, 2010, 01:16:08 AM »

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 ?
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
pivey

Offline Offline

Posts: 33


« Reply #34 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.
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #35 on: December 20, 2010, 01:17:31 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.
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
pivey

Offline Offline

Posts: 33


« Reply #36 on: December 22, 2010, 07:57:24 AM »

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?
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #37 on: December 22, 2010, 11:00:24 AM »

not sure, never tested that, so I use standard letters Smiley
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
pivey

Offline Offline

Posts: 33


« Reply #38 on: July 01, 2011, 10:30:16 AM »

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.
Logged
aesteves

Offline Offline

Posts: 4


« Reply #39 on: July 11, 2011, 03:02:41 PM »

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

Code:
ksort($langarr);

with this one (for my case):

Code:
$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
Logged
pivey

Offline Offline

Posts: 33


« Reply #40 on: July 13, 2011, 04:14:48 PM »

@aesteves
  thx for the hint!
Logged
xia

Offline Offline

Posts: 63


« Reply #41 on: January 26, 2012, 06:02:03 PM »

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
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #42 on: January 27, 2012, 09:22:30 AM »

Hi,

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

cheers
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
xia

Offline Offline

Posts: 63


« Reply #43 on: January 27, 2012, 12:31:34 PM »

Thanks!
I don't know what you want say about "set page code"
Logged
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #44 on: January 27, 2012, 02:22:06 PM »

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..
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
xia

Offline Offline

Posts: 63


« Reply #45 on: January 29, 2012, 07:52:40 PM »

I don't have "Page Code"
Logged
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3145



WWW
« Reply #46 on: January 30, 2012, 06:22:59 AM »

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

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

Dietmar
Logged

We are human beings - and nobody is perfect at all.
crnogorac081
AddOn Development
*
Offline Offline

Posts: 1706



« Reply #47 on: January 30, 2012, 09:27:21 AM »

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
Logged

Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
Luisehahne
Board Member
Development Team
*****
Offline Offline

Posts: 3145



WWW
« Reply #48 on: January 30, 2012, 12:00:42 PM »

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

And all is gone by next Release.

Dietmar
Logged

We are human beings - and nobody is perfect at all.
Pages: 1 [2]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!