Différences

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Prochaine révision
Révision précédente
articles:dokuwiki_statistics_lang [2010/09/27 19:45]
nico créée
articles:dokuwiki_statistics_lang [2010/10/01 14:31]
nico
Ligne 1: Ligne 1:
 +~~NOTOC~~
 +======Dokuwiki statistics plugin : multi-language support======
  
 +Mofification of Dokuwiki [[http://​www.dokuwiki.org/​plugin:​statistics|plugin:​statistics]].
 +
 +=====Installation=====
 +
 +To add multi-language support, unzip {{articles:​dokuwiki_statistics_language-support.zip}} in :
 +
 +<​code>​lib/​plugins/​statistics</​code>​
 +
 +The following languages are already translated :
 +
 +  * English
 +  * French
 +
 +=====Add language=====
 +
 +  - Create a folder named according to the [[http://​en.wikipedia.org/​wiki/​List_of_ISO_639-1_codes|ISO 639-1 language code]]. Example for spanish :<​code>​lib/​plugins/​statistics/​lang/​es</​code>​
 +  - Copy inside and translate a //​lang.php//​ file taken from another language.
 +  - [[contact@nliautaud.fr|Send me]] the result!
 +
 +=====Modifications detail=====
 +
 +The following lines of //​admin.php//​ have been modified :
 +
 +<code php>
 +63  echo '<​h1>'​.$this->​getLang('​menu'​).'</​h1>';​
 +106 echo $this->​getLang('​toc'​);​
 +111 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​dashboard'​).'</​a>';​
 +114 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=page&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​popular'​).'</​a>';​
 +117 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=referer&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​in_links'​).'</​a>';​
 +120 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=newreferer&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​new_in_links'​).'</​a>';​
 +123 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=outlinks&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​out_links'​).'</​a>';​
 +126 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=searchphrases&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​search'​).'</​a>';​
 +129 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=searchwords&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​search_words'​).'</​a>';​
 +132 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=searchengines&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​search_engines'​).'</​a>';​
 +135 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=browser&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​browsers'​).'</​a>';​
 +138 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=os&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​os'​).'</​a>';​
 +141 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=country&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​countries'​).'</​a>';​
 +144 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt=resolution&​amp;​f='​.$this->​from.'&​amp;​t='​.$this->​to.'">'​.$this->​getLang('​resolutions'​).'</​a>';​
 +173 echo '<a href="?​do=admin&​amp;​page=statistics&​amp;​opt='​.$this->​opt.'&​amp;​f='​.$now.'&​amp;​t='​.$now.'">';​
 +174 echo $this->​getLang('​today'​);​
 +179 echo $this->​getLang('​yesterday'​);​
 +184 echo $this->​getLang('​last_7'​);​
 +189 echo $this->​getLang('​last_30'​);​
 +208 echo '<​p>'​.$this->​getLang('​dashboard_intro'​).'</​p>';​
 +214 echo '<​li><​span>'​.$result['​pageviews'​].'​ </​span>'​.$this->​getLang('​page_views'​).'</​li>';​
 +215 echo '<​li><​span>'​.$result['​sessions'​].'​ </​span>'​.$this->​getLang('​sessions'​).'</​li>';​
 +216 echo '<​li><​span>'​.$result['​visitors'​].'​ </​span>'​.$this->​getLang('​visitors'​).'</​li>';​
 +217 echo '<​li><​span>'​.$result['​users'​].'​ </​span>'​.$this->​getLang('​users'​).'</​li>';​
 +223 echo '<​h2>'​.$this->​getLang('​popular_most'​).'</​h2>';​
 +230 echo '<​h2>'​.$this->​getLang('​new_in_links'​).'</​h2>';​
 +237 echo '<​h2>'​.$this->​getLang('​search_top'​).'</​h2>';​
 +246 echo '<​h2>'​.$this->​getLang('​countries'​).'</​h2>';​
 +254 echo '<​h2>'​.$this->​getLang('​popular'​).'</​h2>';​
 +261 echo '<​h2>'​.$this->​getLang('​browsers'​).'</​h2>';​
 +269 echo '<​h2>'​.$this->​getLang('​os'​).'</​h2>';​
 +276 echo '<​h2>'​.$this->​getLang('​in_links'​).'</​h2>';​
 +280 printf('<​p>'​.$this->​getLang('​in_links_intro'​).'</​p>',​$all,​$result['​direct'​],​(100*$result['​direct'​]/​$all),​
 +290 echo '<​h2>'​.$this->​getLang('​new_in_links'​).'</​h2>';​
 +291 echo '<​p>'​.$this->​getLang('​new_in_links_intro'​).'</​p>';​
 +298 echo '<​h2>'​.$this->​getLang('​out_links'​).'</​h2>';​
 +305 echo '<​h2>'​.$this->​getLang('​search'​).'</​h2>';​
 +312 echo '<​h2>'​.$this->​getLang('​search_words'​).'</​h2>';​
 +319 echo '<​h2>'​.$this->​getLang('​search_engines'​).'</​h2>';​
 +326 echo '<​h2>'​.$this->​getLang('​resolutions'​).'</​h2>';​
 +329 echo '<​p>'​.$this->​getLang('​resolutions_intro'​).'</​p>';​
 +</​code>​