Revision history for DocumentationLanguageLinking


Revision [18654]

Last edited on 2008-01-28 00:12:18 by PedroM [Modified links pointing to docs server]

No Differences

Revision [11550]

Edited on 2005-10-24 17:05:45 by PedroM [Modified links pointing to docs server]
Additions:
-----
=====MAIN PAGE LANGUAGES=====
* SpanishLanguage
* FrenchLanguage


Revision [11549]

Edited on 2005-10-24 17:04:08 by PedroM [Modified links pointing to docs server]
Additions:
[[http://www.openformats.org Openformats.org]] adopts alphanumeric tags for identifying nodes and their language: for instance **en**, **fr**, **it**, *es**, are the top level nodes in English, French, Italian and Spanish; **en0** is the first subnode of the English version, **it20** is the first subsubnode of the third subnode of the Italian version etc.
$l = explode(" " , $language);
$tag = strip_tags($l[0]);
$lang = strip_tags($l[1]);
print $this->Format("[[".$tag." ".$lang."]]")." ";
Deletions:
[[http://www.openformats.org Openformats.org]] adopts alphanumeric tags for identifying nodes and their language: for instance **en**, **fr**, **it** are the top level nodes in English, French and Italian; **en0** is the first subnode of the English version, **it20** is the first subsubnode of the third subnode of the Italian version etc.
$l = explode(" " , $language);
$tag = strip_tags($l[0]);
$lang = strip_tags($l[1]);
print $this->Format("[[".$tag." ".$lang."]]")." ";
}


Revision [8578]

Edited on 2005-05-28 11:40:12 by JavaWoman [move to subcategory]
Additions:
CategoryDevelopmentDocumentation CategoryDevelopmentActions
Deletions:
CategoryDevelopment


Revision [6921]

Edited on 2005-03-26 18:06:34 by PivWan [move to subcategory]
Additions:
~~&After viewing OF system, it seems good to me. As Nils says, links to other languages (already translated and __not__-translated) would be good. I'm not very constructive atm, but I'll try to think about it and give a small idea about approaching this. -- PivWan


Revision [6759]

Edited on 2005-03-16 13:11:49 by DarTar [Some ideas from openformats.org]
Additions:
%%(php)


Revision [6758]

Edited on 2005-03-16 13:09:57 by DarTar [Some ideas from openformats.org]
Additions:
==The 'quick and dirty' openformats approach==
[[http://www.openformats.org Openformats.org]] adopts alphanumeric tags for identifying nodes and their language: for instance **en**, **fr**, **it** are the top level nodes in English, French and Italian; **en0** is the first subnode of the English version, **it20** is the first subsubnode of the third subnode of the Italian version etc.
There are also a bunch of pages whose tags are camelcase-formatted, but they follow the same convention: **enLinking** is the English altlang of **frLinking** etc.
I post here for reference the modifications I made to Wikka at openformats to support //horizontal links between corresponding pages in different languages// (in ""ODPian"" jargon they are called //altlangs//). This is definitely **not** a suggestion for an action to implement on this server (the code is dirty and tailored to the conventions in use at OF), but just a possible source of inspiration.
**1. Store language definitions in your wiki**
Create an ordinary page called ##Languages## containing language names and their code:
%%
de Deutsch
en English
fr Français
it Italiano
mg Malagasy
%%
**2. Create the action to automatically build altlangs **
Add the ##lang.php## action to ##./actions##:
%%(php;1)
<?php
//get current page
$cpage = $this->GetPageTag();
$ctag = substr($cpage, 0, 2); #extract tag
$cnode = substr($cpage, 2); #extract node
if ($cpage=="main") {
$ctag = "en";
$cnode = "";
}
$page = $this->LoadPage('Languages');
$output = $this->Format($page["body"]);
$couples = explode("\n" , $output);
if (ereg("[A-Z](.*)", $ctag)) { #all public pages in openformats start with a lowercase letter
// page is not public
// display default menu bar
foreach ($couples as $language) {
$l = explode(" " , $language);
$tag = strip_tags($l[0]);
$lang = strip_tags($l[1]);
print $this->Format("[[".$tag." ".$lang."]]")." ";
}
} else {
// page is public
// display navigation menu
foreach ($couples as $language) {
$l = explode(" " , $language);
$tag = strip_tags($l[0]);
$lang = strip_tags($l[1]);
if ($tag == $ctag) {
print $this->Format("**".$lang."**")." ";
} else {
print $this->Format("[[".$tag.$cnode." ".$lang."]]")." ";
}
}
}
?>
%%
**3. Modify the ##header## action**
Add the following code to ##./actions/header.php## at the end of the code, immediately after the closing ##</div>##:
%%
<div class="lang">
<?php
include("lang.php");
?>
</div>
%%


Revision [6755]

Edited on 2005-03-16 11:47:05 by NilsLindenberg [reply (layout + typo)]
Additions:
~~&##documentation.jsnx.com## ? Yes, maybe it's better to wait with this, but why not collect some ideas? --NilsLindenberg
Deletions:
~~&##documentation.jsnx.com# ? MYes, maybe it's better to wait with this, but why not collect some ideas? --NilsLindenberg


Revision [6754]

Edited on 2005-03-16 11:46:42 by NilsLindenberg [reply to dartar]
Additions:
~& Why not, but to do this we first need a //clean// server (possibly with limited ACL access to users willing to participate in the documentation project) and a strict respect of the naming conventions. I suggest we postpone this after the setup of a dedicated documentation server, like - say - ##wikkadocs.jsnx.com## (any suggestions for a better name). JsnX, you think this is feasible ? -- DarTar
~~&##documentation.jsnx.com# ? MYes, maybe it's better to wait with this, but why not collect some ideas? --NilsLindenberg
Deletions:
~& Why not, but to do this we first need a //clean// server (possibly with limited ACL access to users willing to participate in the documentation project) and a strict respect of the naming conventions. I suggest we postpone this after the setup of a dedicated documentation server, like - say - ##wikkadocs.jsnx.com## (any suggestions for a better name). JsnX, you think this is feasible ? -- DarTar


Revision [6732]

Edited on 2005-03-16 02:26:11 by JsnX [Reply to DarTar]
Additions:
~~&Are you asking if it is feasible to have a new subdomain named something like ##wikkadocs.jsnx.com##? Sure. By the way, I'm deferring to you, Nils, JW and others on multilanguage decisions. Just tell me what you need for resources and I'll make it happen. -- JsnX


Revision [6729]

Edited on 2005-03-15 17:18:08 by DarTar [reply to Nils and question for JsnX]
Additions:
~& Why not, but to do this we first need a //clean// server (possibly with limited ACL access to users willing to participate in the documentation project) and a strict respect of the naming conventions. I suggest we postpone this after the setup of a dedicated documentation server, like - say - ##wikkadocs.jsnx.com## (any suggestions for a better name). JsnX, you think this is feasible ? -- DarTar


Revision [6722]

The oldest known version of this page was created on 2005-03-15 15:25:29 by NilsLindenberg [reply to Nils and question for JsnX]
Valid XHTML :: Valid CSS: :: Powered by WikkaWiki