Multilingual wikidot site - the missing puzzle piece

Multilingual wikidot site - the missing puzzle piece

By gerdamigerdami on 14 Nov 2008 20:07, last edit by James KanjoJames Kanjo on 09 May 2010 05:55

Last night, I had a dream.

That's true.

I have dreamed about improving the by using the live templates, instead of using [[include]]. The dream could come to reality if the wikidot developer team could provide me with the missing puzzle piece.

Back to last year

Last year, helmuti_pdorf does not match any existing user name, hartnellhartnell, Phil ChettPhil Chett and I, started the, the first multilingual wikidot website, at least as regards the content.
The trick, I called the Magic Language Navigation, was based on includes. Each page had to include the following:

[[include inc:languages pagename=NewPageNameHerePlease]]

while the content of include:languages was

[[[de:{$pagename}|Deutsch]]], [[[en:{$pagename}|English]]], [[[es:{$pagename}|Español]]], [[[fr:{$pagename}|Français]]], [[[pl:{$pagename}|Polish]]]

Unfortunately, the user had to patch the word NewPageNameHerePlease by the current name of the page, with the convention that the page name would be in English for all languages (fr:start, en:start, de:start, it:start, …)

When previewing the page with the Page module, the words "Deutsch - Chinese - English - Español - Français - Italiano - Japanese - Nederlands - Polski - Português - Türkçe" were displayed. I once wrote this post ((hide)) Mister Hyde /((hide)) but without acknowledge.

Now with the live templates

The advantage with the live templates is that elements other that %%content%% are not displayed with the [[ListPages]] module. Hence the request for hiding something is less urgent.

In action !!!

Have a look at page en:test whose live template is en:_template1with the following content:

[[div style="float:right; width: 80px; border: 1px solid #999; margin: 0px; text-align:center"]]
Page also available in
[[include inc:languages pagename=%%page_unix_name%%]]

… while the include:languages page contains:

[[[de:{$pagename}|Deutsch]]] [[[en:{$pagename}|English]]] [[[fr:{$pagename}|Français]]]

… flag version
[[cell]] [[[de:{$pagename}|de]]] [[/cell]]
[[cell]] [[image /include:languages/de.gif link="de:{$pagename}"]] [[/cell]]
[[cell]] [[[en:{$pagename}|en]]] [[/cell]]
[[cell]] [[image /include:languages/en.gif link="en:{$pagename}"]] [[/cell]]
[[cell]] [[[fr:{$pagename}|fr]]] [[/cell]]
[[cell]] [[image /include:languages/fr.gif link="fr:{$pagename}"]]

The variable $pagename is replaced at display time by the %%page_unix_name%% of the current page.

If you look at page fr:test and hover the mouse over the language links to the right, you will see:


Failed ! but close to the goal.

Why ? Because the %%page_unix_name%% also returns the category of the current page, fr:.

Conclusion - the missing puzzle piece is was …

the right part of the pagename.

That's incredible. Never seen in the world of software companies:
A request during the WE, fulfilled on Monday !



gerdamigerdami. Please visit his/her userPage.


Tags: include multilingual %%page_unix_name%% template

Related Community Blog Posts

The following posts have similar tags and may be related to this post.

Rate it up ?

rating: 0+x


Add a New Comment


Bookmark and Share

Community Blog feed-icon-14x14.png

Posts by date

Posts by tags

addthis admin admin_forum alexa animoto app appplication attributes autocomplete automatic autonumber autosave backwards badge banner birthday blog bloo bookmark bootstrap browser bug bugs button calendar candidate category cell ceo changes chinese chrome cleanup code comment community convert count country csi css database data-forms delete deletion domain embed etension excel explorer favicon featured feature-request features file file-manager firefox fixing form forum free freemind front fun gallery gemeinschaft gerdami german glossary good google handbook header heading help helpon home homepage howto how-to html iframe images include infobox inline internet istorijska_biblioteka italian javascript job join joke link list listpages live localize mail manual mass-delete mass-edit mediawiki members membership membershipapply membershipbypassword michal microsoft mindmanager mindmap mindmeister module multi-file multilingual nested newpage news newspaper nextpage official open pagecalendar pagecalender pagepath pages %%page_unix_name%% permissions playground portuguese press previouspage private pro programming reshuffle rob row russian sandbox scheme scripting search search_engine services simplecal skins snippet social spam spanish squark styles successful syntax system table tag tags template templates theme themes thumbnail thumbnails toolbar town translate turkish tutorial tweet updated_at upload uri url user users variables video vote weneed wiki wikidot wikipedia wish wishlist yaml

Posts by rating

Multilingual wikidot site - the missing puzzle piece
Rating: þ{rating}þ (14 Nov 2008 20:07)

Multilingual wikidot site - the missing puzzle piece
Rating: þ{rating}þ (14 Nov 2008 20:07)

Multilingual wikidot site - the missing puzzle piece
Rating: þ{rating}þ (14 Nov 2008 20:07)


{"module":"feed\/FeedModule","params":{"src":"http:\/\/\/feed\/pages\/category\/blog\/t\/Michal+Frackowiak%27s+blog","limit":"1","module_body":"**[http:\/\/ Michal]:** \n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}
{"module":"feed\/FeedModule","params":{"src":"http:\/\/\/feed\/pages\/category\/dev\/t\/Piotr+Gabryjeluk+blog","limit":"1","module_body":"**[http:\/\/\/ Gabrys]:**\n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}
{"module":"feed\/FeedModule","params":{"src":"http:\/\/\/feed\/pages\/category\/blog\/t\/Squark%27s+Latest+Posts","limit":"1","module_body":"**[http:\/\/\/ Squark]:**\n%%linked_title%%\n[[size smaller]]%%date|%e %b %Y at %H:%M |agohover%%[[\/size]]"}}

Admin dashboard

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Share Alike 2.5 License.