\n";
+
+
+/*
+ * Form to add a new translation
+ */
+
+if ($action == 'add' && ($user->rights->produit->creer || $user->rights->service->creer))
+{
+ //WYSIWYG Editor
+ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
+
+ print ' ';
+ print '';
+
+ print ' ';
+}
+
+llxFooter();
+$db->close();
+?>
\ No newline at end of file
diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php
index 293644be5dc..0e04c7e6b01 100644
--- a/htdocs/core/lib/categories.lib.php
+++ b/htdocs/core/lib/categories.lib.php
@@ -47,6 +47,11 @@ function categories_prepare_head($object,$type)
$head[$h][1] = $langs->trans("Photos");
$head[$h][2] = 'photos';
$h++;
+
+ $head[$h][0] = DOL_URL_ROOT.'/categories/traduction.php?id='.$object->id.'&type='.$type;
+ $head[$h][1] = $langs->trans("Translation");
+ $head[$h][2] = 'translation';
+ $h++;
// Show more tabs from modules
// Entries must be declared in modules descriptor with line
diff --git a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
index c6e43d8ce60..b7f0cdc6ee7 100644
--- a/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
+++ b/htdocs/install/mysql/migration/3.5.0-3.6.0.sql
@@ -1131,3 +1131,16 @@ insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang)
insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (35,'TASK_CREATE','Task created','Executed when a project task is created','project',35);
insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (36,'TASK_MODIFY','Task modified','Executed when a project task is modified','project',36);
insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values (37,'TASK_DELETE','Task deleted','Executed when a project task is deleted','project',37);
+
+-- New : category translation
+create table llx_categorie_lang
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ fk_category integer DEFAULT 0 NOT NULL,
+ lang varchar(5) DEFAULT 0 NOT NULL,
+ label varchar(255) NOT NULL,
+ description text
+)ENGINE=innodb;
+
+ALTER TABLE llx_categorie_lang ADD UNIQUE INDEX uk_category_lang (fk_category, lang);
+ALTER TABLE llx_categorie_lang ADD CONSTRAINT fk_category_lang_fk_category FOREIGN KEY (fk_category) REFERENCES llx_categorie (rowid);
\ No newline at end of file
diff --git a/htdocs/install/mysql/tables/llx_categorie_lang.key.sql b/htdocs/install/mysql/tables/llx_categorie_lang.key.sql
new file mode 100644
index 00000000000..0f588e0a173
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_categorie_lang.key.sql
@@ -0,0 +1,20 @@
+-- ============================================================================
+-- Copyright (C) 2014 Jean-François Ferry
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+-- ============================================================================
+
+ALTER TABLE llx_categorie_lang ADD UNIQUE INDEX uk_category_lang (fk_category, lang);
+ALTER TABLE llx_categorie_lang ADD CONSTRAINT fk_category_lang_fk_category FOREIGN KEY (fk_category) REFERENCES llx_categorie (rowid);
\ No newline at end of file
diff --git a/htdocs/install/mysql/tables/llx_categorie_lang.sql b/htdocs/install/mysql/tables/llx_categorie_lang.sql
new file mode 100644
index 00000000000..34dc0a3406e
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_categorie_lang.sql
@@ -0,0 +1,29 @@
+-- ============================================================================
+-- Copyright (C) 2002-2003 Rodolphe Quiedeville
+-- Copyright (C) 2005-2010 Regis Houssin
+-- Copyright (C) 2009 Laurent Destailleur
+-- Copyright (C) 2014 Jean-François Ferry
+--
+-- This program is free software; you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+-- ============================================================================
+
+create table llx_categorie_lang
+(
+ rowid integer AUTO_INCREMENT PRIMARY KEY,
+ fk_category integer DEFAULT 0 NOT NULL,
+ lang varchar(5) DEFAULT 0 NOT NULL,
+ label varchar(255) NOT NULL,
+ description text
+)ENGINE=innodb;