Index: src/test/java/com/xpn/xwiki/web/XWikiMessageToolTest.java
===================================================================
--- src/test/java/com/xpn/xwiki/web/XWikiMessageToolTest.java	(révision 2097)
+++ src/test/java/com/xpn/xwiki/web/XWikiMessageToolTest.java	(copie de travail)
@@ -111,6 +111,20 @@
     }
 
     /**
+     * A simple test to validate usage of parameters in bundles
+     */
+    public void testGetWithParameter()
+    {
+        this.mockXWiki.stubs().method("getXWikiPreference").will(returnValue(null));
+        this.mockXWiki.stubs().method("Param").will(returnValue("Space1.Doc1"));
+        this.mockXWiki.stubs().method("getDocument").with(eq("Space1.Doc1"), ANYTHING)
+            .will(returnValue(createDocument(111111L, "Space1.Doc1", "key=We have {0} new documents with {1} objects",
+                false)));
+
+        assertEquals("We have 12 new documents with 3 objects", this.tool.get("key", "12", "3"));
+    }
+
+    /**
      * Verify that a document listed as a bundle document that doesn't exist is not returned as
      * a bundle document. 
      */
Index: src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java
===================================================================
--- src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java	(révision 2097)
+++ src/main/java/com/xpn/xwiki/web/XWikiMessageTool.java	(copie de travail)
@@ -137,7 +137,7 @@
         }
         return translation;
     }
-    
+
     /**
      * @return the list of internationalisation document bundle names as a list of XWiki page names
      *         ("Space.Document") or an empty list if no such documents have been found
@@ -271,4 +271,105 @@
         }
         return returnValue;
     }
+
+    /**
+     * Find a translation and set the <code>param0</code>. Each occurence of
+     * {0} is replaced by the <code>param0</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @return the translated string
+     */
+    public String get(String key, String param0)
+    {
+        String translation = get(key);
+        return replaceParam(translation, "{0}", checkParam(param0));
+    }
+
+    /**
+     * Find a translation and set the params values. Each occurence of {XX} is
+     * replaced by the <code>paramXX</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @param param1 the second param
+     * @return the translated string
+     */
+    public String get(String key, String param0, String param1)
+    {
+        String translation = get(key, param0);
+        return replaceParam(translation, "{1}", checkParam(param1));
+    }
+
+    /**
+     * Find a translation and set the params values. Each occurence of {XX} is
+     * replaced by the <code>paramXX</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @param param1 the second param
+     * @param param2 the third param
+     * @return the translated string
+     */
+    public String get(String key, String param0, String param1, String param2)
+    {
+        String translation = get(key, param0, param1);
+        return replaceParam(translation, "{2}", checkParam(param2));
+    }
+
+    /**
+     * Find a translation and set the params values. Each occurence of {XX} is
+     * replaced by the <code>paramXX</code> value.
+     * 
+     * @param key the key string to find
+     * @param param0 the first param
+     * @param param1 the second param
+     * @param param2 the third param
+     * @param param3 the fourth param
+     * @return the translated string
+     */
+    public String get(String key, String param0, String param1, String param2,
+            String param3)
+    {
+        String translation = get(key, param0, param1, param2);
+        return replaceParam(translation, "{3}", checkParam(param3));
+    }
+
+    /**
+     * Returns the default value, if the param is null
+     * 
+     * @param param the param string
+     * @return the param it self if not null, else the default string
+     */
+    private String checkParam(String param)
+    {
+        if (param == null) {
+            param = "";
+        }
+        return param;
+    }
+
+    /**
+     * Looks in the <code>trans</code> string to find <code>paramKey</code>
+     * and replace it with <code>paramValue</code>
+     * 
+     * @param trans the string to be processed
+     * @param paramKey the parameter key
+     * @param paramValue the parameter value
+     * @return the processed string
+     */
+    private String replaceParam(String trans, String paramKey, String paramValue)
+    {
+        int index = trans.indexOf(paramKey);
+        while (index != -1) {
+            StringBuffer buffer = new StringBuffer(trans.length()
+                    - paramKey.length() + paramValue.length());
+            buffer.append(trans.substring(0, index)).append(paramValue).append(
+                    trans.substring(index + paramKey.length()));
+            trans = buffer.toString();
+            index = trans.indexOf(paramKey, index + paramValue.length());
+        }
+        return trans;
+    }
+
 }
