gerdami 14 Nov 2008 20:07
Last night, I had a dream.
That's true.
I have dreamed about improving the handbook.wikidot.com 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, hartnell,
Phil Chett and I, started the handbook.wikidot.com, 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%%]]
[[/div]]
%%content%%
… while the include:languages page contains:
[[[de:{$pagename}|Deutsch]]] [[[en:{$pagename}|English]]] [[[fr:{$pagename}|Français]]]
… flag version
[[table]]
[[row]]
[[cell]] [[[de:{$pagename}|de]]] [[/cell]]
[[cell]] [[image /include:languages/de.gif link="de:{$pagename}"]] [[/cell]]
[[/row]]
[[row]]
[[cell]] [[[en:{$pagename}|en]]] [[/cell]]
[[cell]] [[image /include:languages/en.gif link="en:{$pagename}"]] [[/cell]]
[[/row]]
[[row]]
[[cell]] [[[fr:{$pagename}|fr]]] [[/cell]]
[[cell]] [[image /include:languages/fr.gif link="fr:{$pagename}"]]
[[/cell]]
[[/row]]
[[/table]]
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:
de:fr:test
en:fr:test
fr:fr:test
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 !Thanks
Author
gerdami. Please visit his/her userPage.
Michal wrote on Pro tester site:
( http://pro.wikidot.com/forum/t-105552/141:page-name-witnout-category-right-part-needed#post-310743 )
OK, this is easy to do but so far honestly we did not consider this. At the moment we have introduced:
You can put it in your _template pages and it will return the page name without the category name.
Would you have any better idea how to name this variable? I realize this might be too long…
Can someone test this?
EDIT:. I changed the en:_template and fr: and de: ) and THIS WORKS!
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Thanks Helmut (and Michal, of course).
Now there is some bread on the plank (to have a lot on one's plate), I mean the handbook….
EDIT: Hum, this page needs now some updates …
After the last change of the system-variables by the wikidot team I changed the intermediate used
"%%page_unix_name_without_category%%" to "%%page_name%%".
This seems to work…
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Yes, and already working on handbook.wikidot.com …
test
Ok, it's working. Now, how do you change the language of the menus?
Thank you very much
Marco
You need (as in the handbook) - different "Nav:side" pages for every language.
means "nav:side-en" , "nav:side-fr" a,s,o,
and declare in the admin:manage panels ( navigation elements) the "nav:side" page for the category "fr:"
should not be the "default" but "nav:side.fr" page.. a.s.o. for all languages you need.
And than you neeed to create the different pages of course.
The nav:top is for all pages the same ( on the handbook) , but this is only a setup story..
Hope this was the question?
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?
Hello folks,
I am glad to be here, was looking at another wiki site first, but I signed up here beginning of August 2010, only actually getting going on 23 Dec. 2010.
I also need a multilingual wiki for my task, as I do not fancy the idea of working in 2 different wiki sites for that project.
Do you actually have a TEST wiki sit where one can see and experiment with these functions?
What I would like to see and am interested in helping to implement is tables that can be sorted (like in Wikipedia) as well as simple calculations, like for referencing dates and years for instance. This would not need updating several pages every year changing some (hard-wired / hard-coded) years in the relevant pages.
I have also started to translate the USER LANGUAGE into Afrikaans as far as my time had allowed. But it looks like the closer I get to the end the more new work arrives … ;-)
I am fluent in German, English and Afrikaans and also understand Dutch - however I will then rather answer in Afrikaans or English ;-)
I would like to try out many interesting features, but my time is mostly limited.
I also have many questions how to to certain things … but that would just have to wait for now.
This was just a short introduction.
Kind regards / Viele Grüße / Beste groete / Beste groeten
Peter
Peter-ZA
Hello,
I'm a quite new member of Wikidot and I feel myself a little bit lost. Is there some "step by step" example about how to create a multi-language wiki, maybe a "wikipedia like" template with languages in the side bar that links directly to the article (page) in the selected language?. I'm not interested in the menus; just the contents. Any help is very welcome.
Thanks in advance and have a nice day,
Roxana
http://community.wikidot.com/forum/t-390449/multilingual-wikidot-with-page-switch
Service is my success. My webtips:www.blender.org (Open source), Wikidot-Handbook.
Sie können fragen und mitwirken in der deutschsprachigen » User-Gemeinschaft für WikidotNutzer oder
im deutschen » Wikidot Handbuch ?