Wiclear

You are here :

English Langs

Thursday, 26. April 2007 16:09:11, by David Jobet

 

Contents

Presentation

This is here you will see the langs handled by the site for the content.

If you want your site to be mono lang, then delete undesired langs and add/edit the remaining one.

Here's the default configuration :

Default lang configuration

After a fresh install, you will see 3 langs installed, resulting in a site having 3 lang flags on each pages so you can quickly go from one lang to the others.

Here the english language appears in red. This means this is the master lang. The master lang cannot be deleted (contrary to what the delete link may let you think). The master lang was chosen during the install process.

Deleting a lang

Simply click on the delete link (the last column).
Warning : This will delete all pages of that lang as well as other information linked to it (metadatas, history, comments, attachments, acls, subscription, ...)

Editing a lang

Click on any fields to display the edit form. Change the appropriate values and submit your changes.

Adding a lang

There are 3 empty input fields at the end if the list. So if you want to add russian for example, all you have to do is enter :

You will have to create a flag_ru.png image file having the desired dimension and put it in the wc_icons directory.

Changing of master lang

What if you want the fr lang to be the master lang now ?
The short answer is no you can't.
The longer answer is yes you can, but only if you have just installed Wiclear and you made a mistake or changed your mind. You will be able to do the process explained below at any time but you will also understand it will be cumbersome to do it if you have a lot of pages already written.

  1. edit the "en" entry by clicking one of the field. Change "en" by "fr", "English" by "Français", and "flag_en.png" by "flag_fr.png"
  2. edit the "fr" entry by changing the values from fr to en ...

As you may have guess, this will not swap the master lang relationship, this will only say : all pages written in the english lang are now flagged as french and all pages written in french lang are now flagged as english. So what if you have a lot of pages already written ? You will have to swap them by hand. Yes this is tedious. This is why the short answer is "No you can't change master lang", and you should only do it when you have few pages already written.

The process of swapping the master lang relationship cannot be easily done. This is because by construction all pages are available at least in the master lang. So swapping automatically the master lang would not guarantee you all pages would be available in the new master lang. One solution would be to build a list of untranslated pages and ask the user what to do with those : delete them ? Don't swap them ? So that the process can be done at any time automatically.

As this change should be a design decision when building the site and hence should not be changed later, I think this is not necessary to allow it with a complete automated process. But hey you may disagree : explain your point of view in the comments...

No trackbacks yet

To make a trackback, use ping url http://wiclear.free.fr/tools/trackback/trackback.php?id=121

If your client support ping url auto discovery, you can also try it using directly this page's url

Comments

hiding the language bar

Wednesday, 28. May 2008 09:55:35, by Rodrigo Peñalba

if you want to just hide the language bar, without deleting translations, just go to

/public_html/wiki/inc/classes/node.class.php

and comment the $langList variable, around line 260+

it should something like this after comment on the php code

'<div class="content_meta">'.
'<h1>'.$titleHtml.'</h1>'.
'<p>'.formatDate($this->timestamp).', '.tr('by').' '.formatAuthor($author, $this->email).'</p>'.

// COMMENTED VARIABLE!
// $langList.
// the rest stays the same

'</div>�'.
$toc.$preview;
}
}

Usee the css luke...

Wednesday, 28. May 2008 18:20:34, by David Jobet

... or better : use a css rule to hide the list instead of modifying the code.