Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 24, 2012, 08:27:26 PM
1 Hour
1 Day
1 Week
1 Month
Forever
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
.
155469
Posts in
21707
Topics by
7732
Members
Latest Member:
DarrellDD
WebsiteBaker Community Forum
English
Modules
(Moderator:
Argos
)
Language Matrix
Pages: [
1
]
Go Down
Author
Topic: Language Matrix (Read 5109 times)
iceat
Development Team
Offline
Posts: 97
Language Matrix
«
on:
November 27, 2008, 12:15:12 AM »
Here's the module I promised a while ago
Language Matrix can generate a language menu based on the relations you create among your webpages. Documentation on my website is in Dutch at the moment but i'll take care of an english version later on this week. Both English and Dutch translations are included in the module.
How does it work:
Install both the backend and the frontend.
You'll find the backend in the admin tools.
1. Create the root of each of your languages on level 0 (as explained in the official WebsiteBaker documentation for multilingual sites)
2. Open the backend and add the languages (choose the root page and the startpage for each language, the name of the language will be the text of the link in the menu)
3. As you add languages you'll see the matrix-table grow
4. Create relations in the matrix. (when switching to another language on a page with no relation, you'll be redirected automatically to the startpage (chosen when you added the language))
5. Create your template in the template section.
Template for a link:
Code:
[LINK_X][LANG_X][/LINK]
(instead of the X, type the number of your language starting by 0, eg:
Code:
[LINK_0][LANG_0][/LINK]
-> this will create the link to the first language).
You can change the order of the languages like this:
Code:
[LINK_0][LANG_0][/LINK] - [LINK_2][LANG_2][/LINK] - [LINK_1][LANG_1][/LINK]
Here's how you can use images:
Code:
[LINK_0]<img src='[LANG_0]' />[/LINK]
The frontend is a code snippet. Use this code to call the menu in your template:
Code:
<?php language_menu
();
?>
You can download it here:
http://www.medialoft.be/pages/nl/technische-support/downloads/language-matrix.php
Don't forget to give feedback!
«
Last Edit: November 27, 2008, 12:17:29 AM by iceat
»
Logged
Webdesign/-Development, Freelance
>
http://www.medialoft.be
Vincent
Offline
Posts: 360
Re: Language Matrix
«
Reply #1 on:
November 27, 2008, 09:42:38 AM »
Beautifully made, iceat.
Don't know if I'll use it, but it can be useful if for sites where you'd want to refer to a specific page in another language.
It would be nice to see the parent/child relation in the dropdown list under 'startpagina' - in stead of the alphabetical order.
Regards,
Vincent
Logged
iceat
Development Team
Offline
Posts: 97
Re: Language Matrix
«
Reply #2 on:
November 27, 2008, 09:46:42 AM »
great idea, i'll add it to the roadmap
thx!
Logged
Webdesign/-Development, Freelance
>
http://www.medialoft.be
iceat
Development Team
Offline
Posts: 97
Re: Language Matrix
«
Reply #3 on:
February 16, 2009, 07:16:03 PM »
One of the users reported a small bug, some relations were not shown correctly in the backend. This is fixed now. You can find v1.1 here:
http://www.medialoft.be/pages/nl/technische-support/downloads/language-matrix.php
Logged
Webdesign/-Development, Freelance
>
http://www.medialoft.be
iceat
Development Team
Offline
Posts: 97
Re: Language Matrix
«
Reply #4 on:
February 24, 2009, 08:27:25 AM »
For those who don't understand what this module is for and how it works:
Let's say you have the following structure in your website:
- Dutch
- Page 1
- Page 2
English
- Page 3
- Page 4
When you switch language (eg. english to dutch) on 'Page 4' you should end up on 'Page 2'. But the WebsiteBaker doesn't know this so you'll probably always end up on 'Dutch' or 'Page1' (according to your fixed script).
Language Matrix is an interface wherein you can create relations between different pages (eg. Page4 is connected to Page2). So if you switch from English to Dutch on 'Page 4', you'll end up on 'Page 2'.
Logged
Webdesign/-Development, Freelance
>
http://www.medialoft.be
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Language Matrix
«
Reply #5 on:
February 24, 2009, 09:51:47 AM »
OMG thanks for tip, i was wondering/looking for demo for this
)) this is great
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
iceat
Development Team
Offline
Posts: 97
Re: Language Matrix
«
Reply #6 on:
March 19, 2009, 07:41:33 PM »
I've made an important adjustment to the frontend. Now it uses 'PAGES_DIRECTORY' instead of '/pages' to build his urls.
Enjoy!
http://www.medialoft.be/pages/nl/technische-support/downloads/language-matrix.php
Logged
Webdesign/-Development, Freelance
>
http://www.medialoft.be
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Language Matrix
«
Reply #7 on:
April 21, 2009, 01:28:32 PM »
Hello Iceat,
I tried this module out and I like this Idea (and the look&feel of your modules).
Unfortunatly I didn't get it to work.
Install and everything seems to work correctly.
But there is something wrong with the functionality of the links in the frontend, I think.
Kind regards,
Stefek
Please keep on your promising works for WB CMS
«
Last Edit: April 21, 2009, 01:34:23 PM by Stefek
»
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
iceat
Development Team
Offline
Posts: 97
Re: Language Matrix
«
Reply #8 on:
April 21, 2009, 02:34:27 PM »
If you send me the url of your site, i'll take a look at it.
thx for the compliments!
Logged
Webdesign/-Development, Freelance
>
http://www.medialoft.be
Stefek
WebsiteBaker Org e.V.
Offline
Posts: 4884
Re: Language Matrix
«
Reply #9 on:
April 26, 2009, 09:46:15 PM »
Dear Iceat.
Nevermind.
I did it the "traditional" way this time.
What about a small howto for this Module?
One thing which mostly confused me was the fact, that you are using the "menu titles" instead of "page titles".
If you have, for example, in both languages the page "info", "news" etc. you will find yourself in troble.
For you do not know which item to choose.
So "page titles" were the better choice.
And I would like to see page_id number in brackets behind the "page title" like:
info (7)
news (8 )
info (15)
news (16)
What do you think?
Kind regards,
Stefek
«
Last Edit: April 26, 2009, 09:49:28 PM by Stefek
»
Logged
"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
wizz
Offline
Posts: 3
Re: Language Matrix
«
Reply #10 on:
May 21, 2009, 01:15:14 PM »
Hi there,
I like this feature very much, thanks for the great effort!
One detail could perhaps make things more clearly on the backend, and that's the use of little stripes in front of the directory name to show the level of the page. (Just like the "parent" dropdown under the "pages" tab)
Just my 2 cents.
Logged
D72
Offline
Posts: 253
Re: Language Matrix
«
Reply #11 on:
July 06, 2009, 03:13:03 PM »
In the include.php file of language output, on line 49 is a little html "bug"
Code:
$link = "<a href='".$linkhref."' class='".$cssclass."'>";
This line need to be changed into the line below.
Code:
$link = "<a href=\"".$linkhref."\" class=\"".$cssclass."\">";
The output renders:
Code:
<a href='http://www.site.com/pages/page.php' class='langnormal'>
Which should be:
Code:
<a href="http://www.site.com/pages/page.php" class="langnormal">
It's not that important for most people, but i like to have valid xhtml templates and the markup validation will not succeed with the first line of code.
Logged
jugeh
Offline
Posts: 37
Re: Language Matrix
«
Reply #12 on:
August 29, 2009, 02:47:04 PM »
Hello iceat,
I have a problem with lm in wb2.7 and 2.8.
If I have more than 2 languages the links of the language menu are shifted by one position to the right.
e.g. German - English - French - Italian. If i click Italian the English menu points to the German page, the French points to English a.s.o.
Can be seen on
http://waruwora.org/de/home.php
Please help
«
Last Edit: September 16, 2009, 12:49:18 PM by jugeh
»
Logged
jugeh
Offline
Posts: 37
Re: Language Matrix
«
Reply #13 on:
September 07, 2009, 12:06:34 PM »
Hello,
I found that $currentpage in the function getlink in include.php is giving wrong values but my php knowledge is to poor to solve the problem.
Perhaps an expert can show me the right way.
Please help.
jugeh
Logged
FrankH
Offline
Posts: 735
Re: Language Matrix
«
Reply #14 on:
September 07, 2009, 05:15:45 PM »
Quote from: jugeh on September 07, 2009, 12:06:34 PM
Perhaps an expert can show me the right way.
Try this one, much easier to use and less overhead:
http://www.websitebakers.com/pages/code-snippets/various/easy-multilanguage-link.php
Logged
Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf
jugeh
Offline
Posts: 37
Re: Language Matrix
«
Reply #15 on:
September 07, 2009, 05:37:59 PM »
I try to avoid kernel patches and language matrix is much more end-userfriendly.
Nevertheless thanks for the tip.
Logged
FrankH
Offline
Posts: 735
Re: Language Matrix
«
Reply #16 on:
September 08, 2009, 07:06:20 AM »
Quote from: jugeh on September 07, 2009, 05:37:59 PM
language matrix is much more end-userfriendly.
Sure not. What makes you thinking this?
Logged
Ochs und Esel in ihrem Lauf
halt ich leider auch nicht auf
jugeh
Offline
Posts: 37
Re: Language Matrix
«
Reply #17 on:
September 08, 2009, 08:08:52 AM »
Because I have one page with all relations and every possible link is in a drop-down list.
jugeh
Logged
lausianne
WebsiteBaker Org e.V.
Offline
Posts: 155
Re: Language Matrix
«
Reply #18 on:
June 15, 2011, 07:58:18 AM »
Hi,
http://www.medialoft.be/pages/nl/technische-support/downloads/language-matrix.php
is currently offline. Is there another source for the file somewhere, or would someone be so kind to send me the file?
Thanks!
Cheers, Ralf.
Logged
crnogorac081
AddOn Development
Offline
Posts: 1706
Re: Language Matrix
«
Reply #19 on:
June 15, 2011, 08:40:20 AM »
Hi,
this is really an outdated script, I personaly use: Easy multilanguage link:
http://www.websitebakers.com/pages/code-snippets/various/easy-multilanguage-link.php
you can try with it
cheers
Logged
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
lausianne
WebsiteBaker Org e.V.
Offline
Posts: 155
Re: Language Matrix
«
Reply #20 on:
June 15, 2011, 10:58:17 AM »
Thanks. Doesn't run with 2.8.1. I checked other options, finally found out that 2.8.2 is coming out very soon. 2.8.2 has multilanguage built in. So I'm going to go with that.
Cheers, Ralf.
Logged
Luisehahne
Board Member
Development Team
Offline
Posts: 3144
Re: Language Matrix
«
Reply #21 on:
June 15, 2011, 11:34:08 AM »
Quote
. 2.8.2 has multilanguage built in.
INFO: 2.8.2 is prepaired for multilanguage!
I will be going to put the snippet here. It's running with WB 2.8.1 from revision 1304 and higher.
Dietmar
Logged
We are human beings - and nobody is perfect at all.
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...