diff --git a/htdocs/install/index.php b/htdocs/install/index.php
index f46e9231f53..0c16cfc9d27 100644
--- a/htdocs/install/index.php
+++ b/htdocs/install/index.php
@@ -39,6 +39,8 @@ if (file_exists($conffile) && isset($dolibarr_main_url_root))
exit;
}
+$langs->load("admin");
+
/*
* View
@@ -54,10 +56,7 @@ print '
';
print DOL_VERSION.'
';
print '';
-// Propose la langue d'installation
-$langs->load("admin");
-$langs_available=$langs->get_available_languages("..");
-
+// Ask installation language
print '
| '.$langs->trans("DefaultLanguage").' : | ';
diff --git a/htdocs/lib/functions2.lib.php b/htdocs/lib/functions2.lib.php
index 093a3a0052b..8e06a6293fd 100644
--- a/htdocs/lib/functions2.lib.php
+++ b/htdocs/lib/functions2.lib.php
@@ -996,7 +996,7 @@ function picto_from_langcode($codelang)
if ($codelang == 'auto') $ret=img_picto('',DOL_URL_ROOT.'/theme/common/flags/int.png','',1);
else {
//print $codelang;
- $langtocountryflag=array('fr_CA'=>'mq','ca_ES'=>'catalonia','ar_AR'=>'');
+ $langtocountryflag=array('da_DA'=>'dk','fr_CA'=>'mq','ca_ES'=>'catalonia','ar_AR'=>'');
$tmpcode='';
if (isset($langtocountryflag[$codelang])) $tmpcode=$langtocountryflag[$codelang];
else
diff --git a/htdocs/product.class.php b/htdocs/product.class.php
index 49fc19b2df4..c9781df0308 100644
--- a/htdocs/product.class.php
+++ b/htdocs/product.class.php
@@ -605,20 +605,13 @@ class Product extends CommonObject
/**
- * \brief Charge toutes les traductions du produit
+ * \brief Load array this->multilangs
*/
- function getMultiLangs($langue='')
+ function getMultiLangs()
{
global $langs;
- $langs_available = $langs->get_available_languages();
-
- if ( $langue != '')
- foreach ($langs_available as $key => $value)
- if ( $key == $langue ) $current_lang = $key; // si $langue est une valeur correcte
-
- if ( !$current_lang )
- $current_lang = $langs->getDefaultLang(); // sinon on choisi la langue par defaut
+ $current_lang = $langs->getDefaultLang();
$sql = "SELECT lang, label, description, note";
$sql.= " FROM ".MAIN_DB_PREFIX."product_lang";
diff --git a/htdocs/product/traduction.php b/htdocs/product/traduction.php
index ad06afb1d9d..f15a600c8f5 100644
--- a/htdocs/product/traduction.php
+++ b/htdocs/product/traduction.php
@@ -68,14 +68,14 @@ $_POST["cancel"] != $langs->trans("Cancel") &&
if ( $_POST["lang"] == $current_lang )
{
$product->libelle = $_POST["libelle"];
- $product->description = $_POST["desc"];
- $product->note = $_POST["note"];
+ $product->description = dol_htmlcleanlastbr($_POST["desc"]);
+ $product->note = dol_htmlcleanlastbr($_POST["note"]);
}
else
{
$product->multilangs[$_POST["lang"]]["libelle"] = $_POST["libelle"];
- $product->multilangs[$_POST["lang"]]["description"] = $_POST["desc"];
- $product->multilangs[$_POST["lang"]]["note"] = $_POST["note"];
+ $product->multilangs[$_POST["lang"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]);
+ $product->multilangs[$_POST["lang"]]["note"] = dol_htmlcleanlastbr($_POST["note"]);
}
// sauvegarde en base
@@ -104,14 +104,14 @@ $_POST["cancel"] != $langs->trans("Cancel") &&
if ( $key == $current_lang )
{
$product->libelle = $_POST["libelle-".$key];
- $product->description = $_POST["desc-".$key];
- $product->note = $_POST["note-".$key];
+ $product->description = dol_htmlcleanlastbr($_POST["desc-".$key]);
+ $product->note = dol_htmlcleanlastbr($_POST["note-".$key]);
}
else
{
- $product->multilangs[$key]["libelle"] = $_POST["libelle-".$key];
- $product->multilangs[$key]["description"] = $_POST["desc-".$key];
- $product->multilangs[$key]["note"] = $_POST["note-".$key];
+ $product->multilangs[$key]["libelle"] = $_POST["libelle-".$key];
+ $product->multilangs[$key]["description"] = dol_htmlcleanlastbr($_POST["desc-".$key]);
+ $product->multilangs[$key]["note"] = dol_htmlcleanlastbr($_POST["note-".$key]);
}
}
@@ -292,7 +292,7 @@ if ($_GET["action"] == 'add' && ($user->rights->produit->creer || $user->rights-
print '';
-
+ print ' '; } llxFooter('$Date$ - $Revision$'); ?> diff --git a/htdocs/translate.class.php b/htdocs/translate.class.php index f5a6561d2ec..46cd950426a 100644 --- a/htdocs/translate.class.php +++ b/htdocs/translate.class.php @@ -416,9 +416,9 @@ class Translate { * Parameters of this method must not contains any HTML tags. * \param key key of string to translate * \param param1 chaine de param1 - * \param param2 chaine de param1 - * \param param3 chaine de param1 - * \param param4 chaine de param1 + * \param param2 chaine de param2 + * \param param3 chaine de param3 + * \param param4 chaine de param4 * \return string chaine traduite */ function transnoentities($key, $param1='', $param2='', $param3='', $param4='') |