[PC-BSD Commits] r2324 - in websites: bsdstats.org/bsdstats/slib pbidir.com/bibivu/etc/lang/de pbidir.com/bibivu/etc/lang/en pbidir.com/bibivu/etc/lang/es pbidir.com/bibivu/etc/lang/fr pbidir.com/bibivu/etc/lang/it pbidir.com/bibivu/etc/lang/nl pbidir.com/bibivu/etc/lang/ru pbidir.com/bibivu/etc/lang/tr pbidir.com/bibivu/slib pbidir.com/bibivu/tpl/pbidir pbidir.com/bibivu/tpl/pbidir/comment

svn at pcbsd.org svn at pcbsd.org
Sun Jul 13 08:53:12 PDT 2008


Author: fabry
Date: 2008-07-13 08:53:12 -0700 (Sun, 13 Jul 2008)
New Revision: 2324

Modified:
   websites/bsdstats.org/bsdstats/slib/lang.php
   websites/pbidir.com/bibivu/etc/lang/de/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/de/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/de/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/en/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/en/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/en/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/es/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/es/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/es/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/fr/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/fr/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/fr/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/it/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/it/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/it/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/nl/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/nl/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/nl/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/ru/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/ru/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/ru/search.lang.php
   websites/pbidir.com/bibivu/etc/lang/tr/common.lang.php
   websites/pbidir.com/bibivu/etc/lang/tr/pbi.lang.php
   websites/pbidir.com/bibivu/etc/lang/tr/search.lang.php
   websites/pbidir.com/bibivu/slib/lang.php
   websites/pbidir.com/bibivu/tpl/pbidir/comment/form.php
   websites/pbidir.com/bibivu/tpl/pbidir/header.php
   websites/pbidir.com/bibivu/tpl/pbidir/search.php
Log:
 - a few extra lines of text translate.
 - a fix in the lang.php class to load common strings

Modified: websites/bsdstats.org/bsdstats/slib/lang.php
===================================================================
--- websites/bsdstats.org/bsdstats/slib/lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/bsdstats.org/bsdstats/slib/lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -31,15 +31,21 @@
 
 	public function get($word, $default='', $lang=''){
 		if($lang=='')	$lang = $this->_detect_lang();
-		if(!(isset($this->words[$lang][$word]) && $this->words[$lang][$word]!='')){
+		if(!isset($this->words[$lang][$word]) || $this->words[$lang][$word]==''){
 			//this language is not loaded
 			$file = '';
 			if(strpos($word,'_')>0){
 				list($file, $word1) = explode('_', $word, 2);
+				if($file=='common'){
+					$word = $word1;
+				}
 			}
-			$this->load_lang($lang, $file);
+			if(!$this->load_lang($lang, $file)){
+				//let's try the common file
+				$this->load_lang($lang, '');
+			}
 		}
-		if(!(isset($this->words[$lang][$word]) && $this->words[$lang][$word]!='')){
+		if(!isset($this->words[$lang][$word]) || $this->words[$lang][$word]==''){
 			//nothing .. returning the default
 			//to avoid to load the file over and over
 			//I set the current key as the default
@@ -70,13 +76,19 @@
 		if($file=='') $file = 'common';
 		$folder = ETCPATH.'lang/'.$language.'/';
 		$lang_file = $folder.$file.'.lang'.EXT;
-		if(file_exists($lang_file)){
-			$lang = array();
-			include_once($lang_file);
-			foreach($lang as $key=>$value){
-				$this->words[$language][($file!='common'?$file.'_':'').$key] = $value;
+		if(!isset($this->loaded[$language][$file])){
+			if(file_exists($lang_file)){
+				$lang = array();
+				include_once($lang_file);
+				foreach($lang as $key=>$value){
+					$this->words[$language][($file!='common'?$file.'_':'').$key] = $value;
+				}
+				$this->loaded[$language][$file] = true;
+			} else {
+				$this->loaded[$language][$file] = false;
 			}
 		}
+		return $this->loaded[$language][$file];
 		//maybe later add it to the cache
 	}
 	

Modified: websites/pbidir.com/bibivu/etc/lang/de/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/de/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/de/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Passwort';
 $lang['email'] = 'E-Mail Adresse';
 $lang['search'] = 'Suche';
+$lang['lang_name'] = 'Deutsch';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/de/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/de/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/de/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Bitte <a href="%s">einloggen</a> um einen Kommentar verfassen zu k&ouml;nnen';
 $lang['cannot_comment'] = 'Entschuldigung, zur Zeit ist es nicht m&ouml;glich einen Kommentar zu verfassen';
 $lang['leave_comment'] = 'Hier klicken um einen Kommentar zu verfassen';
+$lang['save_comment'] = 'Save Comment';
 
 $lang['subscribe'] = 'Bei Updates Benachrichtung erhalten';
 $lang['unsubscribe'] = 'Keine Benachrichtung mehr erhalten bei Updates';

Modified: websites/pbidir.com/bibivu/etc/lang/de/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/de/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/de/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Summe';
 
 $lang['page_title'] = 'Such Resultate';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/en/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/en/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/en/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Password';
 $lang['email'] = 'Email';
 $lang['search'] = 'Search';
+$lang['lang_name'] = 'English';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/en/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/en/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/en/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Please <a href="%s">Login</a> To be able to Add a Comment to this pbi';
 $lang['cannot_comment'] = 'Sorry, You cannot Comment at this time!';
 $lang['leave_comment'] = 'Click Here To Add a Comment To This pbi';
+$lang['save_comment'] = 'Save Comment';
 
 $lang['subscribe'] = 'Subscribe to receive updates';
 $lang['unsubscribe'] = 'Unsubscribe from receiving updates';

Modified: websites/pbidir.com/bibivu/etc/lang/en/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/en/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/en/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Summary';
 
 $lang['page_title'] = 'Search results';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/es/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/es/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/es/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Contraseña';
 $lang['email'] = 'Email';
 $lang['search'] = 'Buscar';
+$lang['lang_name'] = 'Español';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/es/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/es/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/es/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Por favor, <a href="%s">Identifícate</a> para poder añadir un comentario a este pbi';
 $lang['cannot_comment'] = 'Lo siento, no puedes comentar en este momento!';
 $lang['leave_comment'] = 'Cliquea aquí para añadir un comentario a este pbi';
+$lang['save_comment'] = 'Save Comment';
 
 $lang['subscribe'] = 'Suscríbete para recibir actualizaciones';
 $lang['unsubscribe'] = 'Cancela la suscripción para dejar de recibir actualizaciones';

Modified: websites/pbidir.com/bibivu/etc/lang/es/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/es/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/es/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -1,12 +1,13 @@
-<?php
-//search messages strings
-$lang['name'] = 'Nombre';
-$lang['added'] = 'Fecha';
-$lang['rating'] = 'Puntuación';
-$lang['downloads'] = 'Descargas';
-
-$lang['licence'] = 'Licencia';
-$lang['summary'] = 'Sumario';
-
-$lang['page_title'] = 'Resultados de la búsqueda';
+<?php
+//search messages strings
+$lang['name'] = 'Nombre';
+$lang['added'] = 'Fecha';
+$lang['rating'] = 'Puntuación';
+$lang['downloads'] = 'Descargas';
+
+$lang['licence'] = 'Licencia';
+$lang['summary'] = 'Sumario';
+
+$lang['page_title'] = 'Resultados de la búsqueda';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/fr/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/fr/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/fr/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Mot de Passe';
 $lang['email'] = 'Email';
 $lang['search'] = 'Rechercher';
+$lang['lang_name'] = 'Français';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/fr/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/fr/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/fr/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Merci de vous <a href="%s">identifier</a> pour pouvoir ajouter un commentaire &agrave; ce pbi';
 $lang['cannot_comment'] = 'D&eacute;sol&eacute;, vous ne pouvez pas commenter pour l\'instant!';
 $lang['leave_comment'] = 'Cliquez ici pour ajouter un commentaire &agrave; ce pbi';
+$lang['save_comment'] = 'Save Comment';
 
 $lang['subscribe'] = 'S\'inscrire pour recevoir les mises &agrave; jour';
 $lang['unsubscribe'] = 'Se d&eacute;sinscrire des mises &agrave; jour';

Modified: websites/pbidir.com/bibivu/etc/lang/fr/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/fr/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/fr/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Description';
 
 $lang['page_title'] = 'R&eacute;sultat de la recherche';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/it/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/it/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/it/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Password';
 $lang['email'] = 'Email';
 $lang['search'] = 'Cerca';
+$lang['lang_name'] = 'Italiano';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/it/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/it/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/it/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Fare il <a href="%s">Login</a> per poter aggiungere commenti';
 $lang['cannot_comment'] = 'Spiacente, Non puoi aggiungere commenti in questo momento!';
 $lang['leave_comment'] = 'Clicca per aggiungere un commento';
+$lang['save_comment'] = 'Salva Commento';
 
 $lang['subscribe'] = 'Iscriviti per ricevere gli aggiornamenti';
 $lang['unsubscribe'] = 'Deiscriviti dal ricevere gli aggiornamenti';

Modified: websites/pbidir.com/bibivu/etc/lang/it/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/it/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/it/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Riepilogo';
 
 $lang['page_title'] = 'Risultati Ricerca';
+$lang['not_found'] = 'Nessun PBI trovato';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/nl/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/nl/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/nl/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Wachtwoord';
 $lang['email'] = 'Email';
 $lang['search'] = 'Zoeken';
+$lang['lang_name'] = 'Nederlands';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/nl/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/nl/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/nl/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'U moet <a href="%s">ingelogd zijn</a> om commentaar over deze pbi achter te kunnen laten.';
 $lang['cannot_comment'] = 'Sorry, U kunt momenteel geen commentaaar achterlaten!';
 $lang['leave_comment'] = 'Klik hier om commentaar achter te laten voor deze pbi';
+$lang['save_comment'] = 'Save Comment';
 
 $lang['subscribe'] = 'Abonneren voor het verkrijgen van updates';
 $lang['unsubscribe'] = 'Abonnement opzeggen voor het verkrijgen van updates';

Modified: websites/pbidir.com/bibivu/etc/lang/nl/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/nl/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/nl/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Samenvatting';
 
 $lang['page_title'] = 'Zoek resultaten';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/ru/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/ru/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/ru/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = 'Пароль';
 $lang['email'] = 'EMail';
 $lang['search'] = 'Поиск';
+$lang['lang_name'] = 'Russian';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/etc/lang/ru/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/ru/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/ru/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Пожалуйста <a href="%s">Зайдите</a> чтобы комментировать';
 $lang['cannot_comment'] = 'Извините, Вы не можете сейчас комментировать!';
 $lang['leave_comment'] = 'Нажмите сюда, чтобы добавить комментарий к данному pbi';
+$lang['save_comment'] = 'Сохранить комментарий';
 
 $lang['subscribe'] = 'Подписаться для получения обновлений';
 $lang['unsubscribe'] = 'Отписаться от получения обновлений';

Modified: websites/pbidir.com/bibivu/etc/lang/ru/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/ru/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/ru/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Комментарии';
 
 $lang['page_title'] = 'Результаты поиска';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>

Modified: websites/pbidir.com/bibivu/etc/lang/tr/common.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/tr/common.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/tr/common.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,4 +7,5 @@
 $lang['password'] = '&#350;ifre';
 $lang['email'] = 'E-posta';
 $lang['search'] = 'Ara';
+$lang['lang_name'] = 'Türkçe';
 ?>

Modified: websites/pbidir.com/bibivu/etc/lang/tr/pbi.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/tr/pbi.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/tr/pbi.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -19,6 +19,7 @@
 $lang['login_to_comment'] = 'Lütfen bu pbi\'ye yorum b&#305;rakabilmek için <a href="%s">Giri&#351; yap&#305;n</a>';
 $lang['cannot_comment'] = 'Özür dileriz, &#351;u anda yorum b&#305;rakamazs&#305;n&#305;z!';
 $lang['leave_comment'] = 'Bu pbi\'ye yorum b&#305;rakmak için buraya t&#305;klay&#305;n';
+$lang['save_comment'] = 'Kommentar speichern';
 
 $lang['subscribe'] = 'Güncellemeleri edinmek için üye ol';
 $lang['unsubscribe'] = 'Güncellemeleri edinme üyeli&#287;inden ç&#305;k';

Modified: websites/pbidir.com/bibivu/etc/lang/tr/search.lang.php
===================================================================
--- websites/pbidir.com/bibivu/etc/lang/tr/search.lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/etc/lang/tr/search.lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -9,4 +9,5 @@
 $lang['summary'] = 'Özet';
 
 $lang['page_title'] = 'Sonuçlar&#305; ara';
+$lang['not_found'] = 'No PBI found for your search criteria';
 ?>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/slib/lang.php
===================================================================
--- websites/pbidir.com/bibivu/slib/lang.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/slib/lang.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -31,15 +31,21 @@
 
 	public function get($word, $default='', $lang=''){
 		if($lang=='')	$lang = $this->_detect_lang();
-		if(!(isset($this->words[$lang][$word]) && $this->words[$lang][$word]!='')){
+		if(!isset($this->words[$lang][$word]) || $this->words[$lang][$word]==''){
 			//this language is not loaded
 			$file = '';
 			if(strpos($word,'_')>0){
 				list($file, $word1) = explode('_', $word, 2);
+				if($file=='common'){
+					$word = $word1;
+				}
 			}
-			$this->load_lang($lang, $file);
+			if(!$this->load_lang($lang, $file)){
+				//let's try the common file
+				$this->load_lang($lang, '');
+			}
 		}
-		if(!(isset($this->words[$lang][$word]) && $this->words[$lang][$word]!='')){
+		if(!isset($this->words[$lang][$word]) || $this->words[$lang][$word]==''){
 			//nothing .. returning the default
 			//to avoid to load the file over and over
 			//I set the current key as the default
@@ -70,13 +76,19 @@
 		if($file=='') $file = 'common';
 		$folder = ETCPATH.'lang/'.$language.'/';
 		$lang_file = $folder.$file.'.lang'.EXT;
-		if(file_exists($lang_file)){
-			$lang = array();
-			include_once($lang_file);
-			foreach($lang as $key=>$value){
-				$this->words[$language][($file!='common'?$file.'_':'').$key] = $value;
+		if(!isset($this->loaded[$language][$file])){
+			if(file_exists($lang_file)){
+				$lang = array();
+				include_once($lang_file);
+				foreach($lang as $key=>$value){
+					$this->words[$language][($file!='common'?$file.'_':'').$key] = $value;
+				}
+				$this->loaded[$language][$file] = true;
+			} else {
+				$this->loaded[$language][$file] = false;
 			}
 		}
+		return $this->loaded[$language][$file];
 		//maybe later add it to the cache
 	}
 	

Modified: websites/pbidir.com/bibivu/tpl/pbidir/comment/form.php
===================================================================
--- websites/pbidir.com/bibivu/tpl/pbidir/comment/form.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/tpl/pbidir/comment/form.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -1,6 +1,6 @@
 <div id="comment_form">
 <form action="<?=$comment_to_uri?>" method="post" onsubmit="return saveComment('<?=$comment_to_uri?>');">
 	<textarea class="inputbox textareabox" name="pbi_comment" id="pbi_comment"></textarea>
-	<input type="submit" value="Save Comment" id="submit_comment" class="button" />
+	<input type="submit" value="<?=load_library('lang')->get('pbi_save_comment')?>" id="submit_comment" class="button" />
 </form>
 </div>
\ No newline at end of file

Modified: websites/pbidir.com/bibivu/tpl/pbidir/header.php
===================================================================
--- websites/pbidir.com/bibivu/tpl/pbidir/header.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/tpl/pbidir/header.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -38,14 +38,14 @@
 	<div id="main">
 		<div id="header">
 			<div class="languages">
-				<a href="/bt/lang/en" class="language_flag"><img src="/bibivu/tpl/img/flag-EN.gif" title="english" alt="english" /></a>
-				<a href="/bt/lang/es" class="language_flag"><img src="/bibivu/tpl/img/flag-ES.gif" title="español" alt="español" /></a>
-				<a href="/bt/lang/it" class="language_flag"><img src="/bibivu/tpl/img/flag-IT.gif" title="italiano" alt="italiano" /></a>
-				<a href="/bt/lang/de" class="language_flag"><img src="/bibivu/tpl/img/flag-DE.gif" title="deutsch" alt="deutsch" /></a>
-				<a href="/bt/lang/fr" class="language_flag"><img src="/bibivu/tpl/img/flag-FR.gif" title="français" alt="français" /></a>
-				<a href="/bt/lang/tr" class="language_flag"><img src="/bibivu/tpl/img/flag-TR.gif" title="türkçe" alt="türkçe" /></a>
-				<a href="/bt/lang/nl" class="language_flag"><img src="/bibivu/tpl/img/flag-NL.gif" title="nederlands" alt="nederlands" /></a>
-				<a href="/bt/lang/ru" class="language_flag"><img src="/bibivu/tpl/img/flag-RU.gif" title="russian" alt="russian" /></a>
+				<a href="/bt/lang/en" class="language_flag"><img src="/bibivu/tpl/img/flag-EN.gif" title="<?=load_library('lang')->get('lang_name','English','en')?>" alt="<?=load_library('lang')->get('lang_name','English','en')?>" border="0" /></a>
+				<a href="/bt/lang/es" class="language_flag"><img src="/bibivu/tpl/img/flag-ES.gif" title="<?=load_library('lang')->get('lang_name','Spanish','es')?>" alt="<?=load_library('lang')->get('lang_name','Spanish','es')?>" border="0" /></a>
+				<a href="/bt/lang/it" class="language_flag"><img src="/bibivu/tpl/img/flag-IT.gif" title="<?=load_library('lang')->get('lang_name','Italian','it')?>" alt="<?=load_library('lang')->get('lang_name','Italian','it')?>" border="0" /></a>
+				<a href="/bt/lang/de" class="language_flag"><img src="/bibivu/tpl/img/flag-DE.gif" title="<?=load_library('lang')->get('lang_name','Deutsch','de')?>" alt="<?=load_library('lang')->get('lang_name','Deutsch','de')?>" border="0" /></a>
+				<a href="/bt/lang/fr" class="language_flag"><img src="/bibivu/tpl/img/flag-FR.gif" title="<?=load_library('lang')->get('lang_name','French','fr')?>" alt="<?=load_library('lang')->get('lang_name','French','fr')?>" border="0" /></a>
+				<a href="/bt/lang/tr" class="language_flag"><img src="/bibivu/tpl/img/flag-TR.gif" title="<?=load_library('lang')->get('lang_name','Turkish','tr')?>" alt="<?=load_library('lang')->get('lang_name','Turkish','tr')?>" border="0" /></a>
+				<a href="/bt/lang/nl" class="language_flag"><img src="/bibivu/tpl/img/flag-NL.gif" title="<?=load_library('lang')->get('lang_name','Nederlands','nl')?>" alt="<?=load_library('lang')->get('lang_name','Nederlands','nl')?>" border="0" /></a>
+				<a href="/bt/lang/ru" class="language_flag"><img src="/bibivu/tpl/img/flag-RU.gif" title="<?=load_library('lang')->get('lang_name','Russian','ru')?>" alt="<?=load_library('lang')->get('lang_name','Russian','ru')?>" border="0" /></a>
 			</div>
 			<h1 id="logo"><a href="<?=$home_uri?>"><?=load_library('lang')->get('pbidir')?></a></h1>
 			<form action="<?=$search_uri?>" method="get" id="search_form" class="search_form">

Modified: websites/pbidir.com/bibivu/tpl/pbidir/search.php
===================================================================
--- websites/pbidir.com/bibivu/tpl/pbidir/search.php	2008-07-13 15:05:24 UTC (rev 2323)
+++ websites/pbidir.com/bibivu/tpl/pbidir/search.php	2008-07-13 15:53:12 UTC (rev 2324)
@@ -7,58 +7,63 @@
 } else {
 	$this_uri = $search_uri.'str/'.urlencode($search_text);
 }
-?><table class="packages">
-	<tbody>
-	<tr>
-		<th class="name"><a class="<?=$order=='name'?$order_mode:''?>" href="<?=$this_uri?>/name/<?=$order=='name'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_name')?></a></th>
-		<th class="added"><a class="<?=$order=='added'?$order_mode:''?>" href="<?=$this_uri?>/added/<?=$order=='added'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_added')?></a></th>
-		<th class="rating"><a class="<?=$order=='rating'?$order_mode:''?>" href="<?=$this_uri?>/rating/<?=$order=='rating'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_rating')?></a></th>
-		<th class="counter"><a class="<?=$order=='download'?$order_mode:''?>" href="<?=$this_uri?>/download/<?=$order=='download'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_downloads')?></a></th>
-	</tr>
-<?php
-foreach($pbis as $pbi){
-	?><tr>
-		<td class="name">
-			<?php
-			if($pbi['icon']!=''){
-				?><a href="<?=$pbi_uri?>/<?=$pbi['id']?>"><img src="<?=$pbi['icon']?>" alt="icon" title="icon" class="pbi_icon" /></a><?php
-			}
-			?>
-			<div class="quickdesc">
-				<h1><a href="<?=$pbi_uri?>/<?=$pbi['id']?>"><?=$pbi['name']?></a></h1>
-				<div class="infos">
-					<strong><?=load_library('lang')->get('search_licence')?>:</strong> <?=$pbi['licence']?><br /><?php
-				if($pbi['summary']!=''){
-					?><strong><?=load_library('lang')->get('search_summary')?>: </strong><?=$pbi['summary']?><?php
-				} ?></div>
-			</div>
-		</td>
-		<td class="added"><?=load_library('format')->date($pbi['date_added'])?></td>
-		<td class="rating"><div class="container_rating_bar"><div class="rating_bar" style="width: <?=$pbi['rating']*10?>px;"><?=$pbi['rating']?></div></div></td>
-		<td class="counter"><?=load_library('format')->number_format($pbi['total_download'])?></td>
-	</tr><?php
-}
-?>
-</tbody>
-</table>
-<?php
-if($result['total_pbis']>$pbis_per_page){
-	$out_pages = array();
-	$pages = (int)($result['total_pbis']/$pbis_per_page);
-	if($current_page>0){
-		$out_pages[] = '<a href="'.$this_uri.'/'.$order.'/'.$order_mode.'/'.($current_page-1).'">Previous</a>';
+
+if(count($pbis)>0){
+	?><table class="packages">
+		<tbody>
+		<tr>
+			<th class="name"><a class="<?=$order=='name'?$order_mode:''?>" href="<?=$this_uri?>/name/<?=$order=='name'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_name')?></a></th>
+			<th class="added"><a class="<?=$order=='added'?$order_mode:''?>" href="<?=$this_uri?>/added/<?=$order=='added'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_added')?></a></th>
+			<th class="rating"><a class="<?=$order=='rating'?$order_mode:''?>" href="<?=$this_uri?>/rating/<?=$order=='rating'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_rating')?></a></th>
+			<th class="counter"><a class="<?=$order=='download'?$order_mode:''?>" href="<?=$this_uri?>/download/<?=$order=='download'?($order_mode=='asc'?'desc':'asc'):''?>"><?=load_library('lang')->get('search_downloads')?></a></th>
+		</tr>
+	<?php
+	foreach($pbis as $pbi){
+		?><tr>
+			<td class="name">
+				<?php
+				if($pbi['icon']!=''){
+					?><a href="<?=$pbi_uri?>/<?=$pbi['id']?>"><img src="<?=$pbi['icon']?>" alt="icon" title="icon" class="pbi_icon" /></a><?php
+				}
+				?>
+				<div class="quickdesc">
+					<h1><a href="<?=$pbi_uri?>/<?=$pbi['id']?>"><?=$pbi['name']?></a></h1>
+					<div class="infos">
+						<strong><?=load_library('lang')->get('search_licence')?>:</strong> <?=$pbi['licence']?><br /><?php
+					if($pbi['summary']!=''){
+						?><strong><?=load_library('lang')->get('search_summary')?>: </strong><?=$pbi['summary']?><?php
+					} ?></div>
+				</div>
+			</td>
+			<td class="added"><?=load_library('format')->date($pbi['date_added'])?></td>
+			<td class="rating"><div class="container_rating_bar"><div class="rating_bar" style="width: <?=$pbi['rating']*10?>px;"><?=$pbi['rating']?></div></div></td>
+			<td class="counter"><?=load_library('format')->number_format($pbi['total_download'])?></td>
+		</tr><?php
 	}
-	for($i=0; $i<=$pages; $i++){
-		if($i==$current_page){
-			$out = '<strong>'.($i+1).'</strong>';
-		} else {
-			$out = $i+1;
+	?>
+	</tbody>
+	</table>
+	<?php
+	if($result['total_pbis']>$pbis_per_page){
+		$out_pages = array();
+		$pages = (int)($result['total_pbis']/$pbis_per_page);
+		if($current_page>0){
+			$out_pages[] = '<a href="'.$this_uri.'/'.$order.'/'.$order_mode.'/'.($current_page-1).'">Previous</a>';
 		}
-		$out_pages[] = '<a href="'.$this_uri.'/'.$order.'/'.$order_mode.'/'.$i.'">'.$out.'</a>';
+		for($i=0; $i<=$pages; $i++){
+			if($i==$current_page){
+				$out = '<strong>'.($i+1).'</strong>';
+			} else {
+				$out = $i+1;
+			}
+			$out_pages[] = '<a href="'.$this_uri.'/'.$order.'/'.$order_mode.'/'.$i.'">'.$out.'</a>';
+		}
+		if($current_page<$pages){
+			$out_pages[] = '<a href="'.$this_uri.'/'.$order.'/'.$order_mode.'/'.($current_page+1).'">Next</a>';
+		}
+		?><center><p><?=implode('<font color="#000000"> <b>|</b> </font>',$out_pages)?></p></center><?php
 	}
-	if($current_page<$pages){
-		$out_pages[] = '<a href="'.$this_uri.'/'.$order.'/'.$order_mode.'/'.($current_page+1).'">Next</a>';
-	}
-	?><center><p><?=implode('<font color="#000000"> <b>|</b> </font>',$out_pages)?></p></center><?php
+} else {
+	?><?=load_library('lang')->get('search_not_found')?><?php
 }
 ?>
\ No newline at end of file



More information about the Commits mailing list