Index: main/plugin-odf-sync/i18n/messages_en.xml
===================================================================
--- main/plugin-odf-sync/i18n/messages_en.xml	(revision 54001)
+++ main/plugin-odf-sync/i18n/messages_en.xml	(working copy)
@@ -359,6 +359,21 @@
 	<message key="PLUGINS_ODF_RIGHTS_ODF_PERSON_SYNCHRONIZE">Synchroniser un contact</message>
 	<message key="PLUGINS_ODF_RIGHTS_ODF_PERSON_SYNCHRONIZE_DESC">Autorise la synchronisation d'un contact</message>
 	<message key="PLUGINS_ODF_RIGHTS_GLOBAL_SYNCHRONIZATION">Synchronisation globale</message>
-	<message key="PLUGINS_ODF_RIGHTS_GLOBAL_SYNCHRONIZATION_DESC">Autorise à lancer manuellement la synchronisation globale</message>   
+	<message key="PLUGINS_ODF_RIGHTS_GLOBAL_SYNCHRONIZATION_DESC">Autorise à lancer manuellement la synchronisation globale</message> 
+    
+    <!-- CDM v4 v3 -->
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_FR">French</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_EN">English</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_ES">Spanish</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_IT">Italian</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_DE">German</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_ZH">Chinese</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_RU">Russian</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_AR">Arabic</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_JA">Japanese</message>
+    
+    <message key="PLUGINS_ODF_SYNC_CDM_DURATION_1">1 year</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_DURATION_2">2 years</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_DURATION_3">3 years</message>  
 </catalogue>
 	
\ No newline at end of file
Index: main/plugin-odf-sync/i18n/messages_fr.xml
===================================================================
--- main/plugin-odf-sync/i18n/messages_fr.xml	(revision 54001)
+++ main/plugin-odf-sync/i18n/messages_fr.xml	(working copy)
@@ -359,6 +359,21 @@
 	<message key="PLUGINS_ODF_RIGHTS_ODF_PERSON_SYNCHRONIZE">Synchroniser un contact</message>
 	<message key="PLUGINS_ODF_RIGHTS_ODF_PERSON_SYNCHRONIZE_DESC">Autorise la synchronisation d'un contact</message>
 	<message key="PLUGINS_ODF_RIGHTS_GLOBAL_SYNCHRONIZATION">Synchronisation globale</message>
-	<message key="PLUGINS_ODF_RIGHTS_GLOBAL_SYNCHRONIZATION_DESC">Autorise à lancer manuellement la synchronisation globale</message>    
+	<message key="PLUGINS_ODF_RIGHTS_GLOBAL_SYNCHRONIZATION_DESC">Autorise à lancer manuellement la synchronisation globale</message>  
+    
+    <!-- CDM v4 v3 -->
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_FR">Français</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_EN">Anglais</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_ES">Espagnol</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_IT">Italien</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_DE">Allemand</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_ZH">Chinois</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_RU">Russe</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_AR">Arabe</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_JA">Japonais</message>
+    
+    <message key="PLUGINS_ODF_SYNC_CDM_DURATION_1">1 an</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_DURATION_2">2 ans</message>
+    <message key="PLUGINS_ODF_SYNC_CDM_DURATION_3">3 ans</message>
 </catalogue>
 	
\ No newline at end of file
Index: main/plugin-odf-sync/plugin.xml
===================================================================
--- main/plugin-odf-sync/plugin.xml	(revision 54001)
+++ main/plugin-odf-sync/plugin.xml	(working copy)
@@ -474,6 +474,26 @@
                 </namespaces>
            </extension>  
         </extensions>
+    </feature>  
+    
+    <!-- +
+         | Ametys implementation / CDM 4.1
+         + -->
+    <feature name="synchronization.ametys.cdm41">
+        <extensions>
+            <extension point="org.ametys.plugins.odfsync.cdmfr.CDMFrSyncExtensionPoint"
+                       id="org.ametys.plugins.odfsync.cdmfr.Ametys3CDM41ODFSyncManager"
+                       class="org.ametys.plugins.odfsync.cdmfr.transformers.DefaultCDMFrSyncTransformer">
+                <app>^Ametys v4\.[0-9]+$</app>
+                <configuration>
+                    <xsl-transform>plugin:odf-sync://stylesheets/cdm41/cdmfr2content.xsl</xsl-transform>
+                </configuration>
+                <namespaces>
+                    <namespace prefix="cdm" value="http://cdm-fr.fr/2013/CDM"/>
+                    <namespace prefix="cdmfr" value="http://cdm-fr.fr/2013/CDM-frSchema"/>
+                </namespaces>
+           </extension>  
+        </extensions>
     </feature>  	
 	
 	<!-- +
Index: main/plugin-odf-sync/sitemap.xmap
===================================================================
--- main/plugin-odf-sync/sitemap.xmap	(revision 54001)
+++ main/plugin-odf-sync/sitemap.xmap	(working copy)
@@ -237,6 +237,9 @@
 					<map:parameter name="import-root-orgunit-only" value="{parent-context-attr:importRootOrgUnitOnly}"/>
 				</map:transform>
 				<map:transform type="richtext-transform"/>
+				<map:transform type="i18n">
+                    <map:parameter name="locale" value="{locale:locale}"/>
+                </map:transform>
 				<map:serialize type="xml"/>
 			</map:match>
 			
Index: main/plugin-odf-sync/stylesheets/cdm41/cdmfr2content.xsl
===================================================================
--- main/plugin-odf-sync/stylesheets/cdm41/cdmfr2content.xsl	(revision 0)
+++ main/plugin-odf-sync/stylesheets/cdm41/cdmfr2content.xsl	(revision 0)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2012 Anyware Services
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   -->
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:cdm="http://cdm-fr.fr/2012/CDM"
+	xmlns:cdmfr="http://cdm-fr.fr/2012/CDM-frSchema"
+	exclude-result-prefixes="cdm cdmfr">
+	
+	<xsl:import href="../cdm112/cdmfr2content.xsl"/>
+
+    <xsl:include href="person2content.xsl"/>
+    <xsl:include href="orgunit2content.xsl"/>
+    <xsl:include href="course2content.xsl"/>
+    <xsl:include href="program2content.xsl"/>
+
+</xsl:stylesheet>
Index: main/plugin-odf-sync/stylesheets/cdm41/course2content.xsl
===================================================================
--- main/plugin-odf-sync/stylesheets/cdm41/course2content.xsl	(revision 0)
+++ main/plugin-odf-sync/stylesheets/cdm41/course2content.xsl	(revision 0)
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2012 Anyware Services
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   -->
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:cdm="http://cdm-fr.fr/2012/CDM"
+	xmlns:cdmfr="http://cdm-fr.fr/2012/CDM-frSchema"
+	xmlns:ametys-cdm="http://www.ametys.org/cdm/1.0"
+	exclude-result-prefixes="cdm cdmfr">
+	
+	   <xsl:import href="../cdm112/course2content.xsl"/>
+
+</xsl:stylesheet>
Index: main/plugin-odf-sync/stylesheets/cdm41/orgunit2content.xsl
===================================================================
--- main/plugin-odf-sync/stylesheets/cdm41/orgunit2content.xsl	(revision 0)
+++ main/plugin-odf-sync/stylesheets/cdm41/orgunit2content.xsl	(revision 0)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2012 Anyware Services
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   -->
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:cdm="http://cdm-fr.fr/2012/CDM"
+	xmlns:cdmfr="http://cdm-fr.fr/2012/CDM-frSchema"
+	exclude-result-prefixes="cdm cdmfr">
+	
+	<xsl:import href="../cdm112/orgunit2content.xsl"/>
+    
+</xsl:stylesheet>
Index: main/plugin-odf-sync/stylesheets/cdm41/person2content.xsl
===================================================================
--- main/plugin-odf-sync/stylesheets/cdm41/person2content.xsl	(revision 0)
+++ main/plugin-odf-sync/stylesheets/cdm41/person2content.xsl	(revision 0)
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2012 Anyware Services
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   -->
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:cdm="http://cdm-fr.fr/2012/CDM"
+	xmlns:cdmfr="http://cdm-fr.fr/2012/CDM-frSchema"
+	exclude-result-prefixes="cdm cdmfr">
+	
+	<xsl:import href="../cdm112/person2content.xsl"/>
+    
+</xsl:stylesheet>
Index: main/plugin-odf-sync/stylesheets/cdm41/program2content.xsl
===================================================================
--- main/plugin-odf-sync/stylesheets/cdm41/program2content.xsl	(revision 0)
+++ main/plugin-odf-sync/stylesheets/cdm41/program2content.xsl	(revision 0)
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+   Copyright 2012 Anyware Services
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+   -->
+<xsl:stylesheet version="1.0"
+	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+	xmlns:cdm="http://cdm-fr.fr/2013/CDM"
+	xmlns:cdmfr="http://cdm-fr.fr/2013/CDM-frSchema"
+	xmlns:ametys-cdm="http://www.ametys.org/cdm/1.0"
+	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
+	exclude-result-prefixes="cdm cdmfr ametys-cdm">
+	
+	<xsl:import href="../cdm112/program2content.xsl"/>
+    
+    <!-- Responsable -->
+    <xsl:template name="program-personInCharge">
+        <personInCharge type="person" multiple="true">
+            <xsl:for-each select="cdm:contacts/cdm:refPerson[@role != 'contact']">
+                <item><xsl:value-of select="@idRef"/></item>
+            </xsl:for-each>
+        </personInCharge>
+    </xsl:template>
+    
+    <!-- Langue -->
+    <xsl:template name="program-educationLanguage">
+        <educationLanguage type="string">
+            <xsl:for-each select="cdm:instructionLanguage">
+                <xsl:call-template name="transformLanguage">
+                    <xsl:with-param name="teachingLang" select="@teachingLang"/>
+                </xsl:call-template>
+                <xsl:if test="position() != last()">, </xsl:if>
+            </xsl:for-each>
+        </educationLanguage>
+    </xsl:template>
+    
+    <!-- Durée -->
+    <xsl:template name="program-duration">
+        <duration type="string">
+            <xsl:call-template name="transformDuration">
+                 <xsl:with-param name="programDuration" select="cdm:programDuration"/>
+             </xsl:call-template>
+        </duration>
+    </xsl:template>
+    
+    <!-- Transform V4 language code to label -->
+    <xsl:template name="transformLanguage">
+        <xsl:param name="teachingLang" />
+        <xsl:choose>
+            <xsl:when test="$teachingLang = 'fr'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_FR"/></xsl:when>
+            <xsl:when test="$teachingLang = 'en'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_EN"/></xsl:when>
+            <xsl:when test="$teachingLang = 'es'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_ES"/></xsl:when>
+            <xsl:when test="$teachingLang = 'it'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_IT"/></xsl:when>
+            <xsl:when test="$teachingLang = 'de'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_DE"/></xsl:when>
+            <xsl:when test="$teachingLang = 'zh'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_ZH"/></xsl:when>
+            <xsl:when test="$teachingLang = 'ru'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_RU"/></xsl:when>
+            <xsl:when test="$teachingLang = 'ar'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_AR"/></xsl:when>
+            <xsl:when test="$teachingLang = 'ja'"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_LANGUAGE_JA"/></xsl:when>
+            <xsl:otherwise><xsl:value-of select="$teachingLang" /></xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+    <!-- Transform V4 duration to label -->
+    <xsl:template name="transformDuration">
+        <xsl:param name="programDuration" />
+        <xsl:choose>
+            <xsl:when test="$programDuration = 1"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_DURATION_1"/></xsl:when>
+            <xsl:when test="$programDuration = 2"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_DURATION_2"/></xsl:when>
+            <xsl:when test="$programDuration = 3"><i18n:text i18n:catalogue="plugin.odf-sync" i18n:key="PLUGINS_ODF_SYNC_CDM_DURATION_3"/></xsl:when>
+            <xsl:otherwise><xsl:value-of select="$programDuration" /></xsl:otherwise>
+        </xsl:choose>
+    </xsl:template>
+    
+</xsl:stylesheet>
