﻿<?xml version="1.0" encoding="utf-8" ?>
<ignite version="1.0" source="bing">

  <func name="Translate" endpoint="MANAGED" format="XML" >
    <description>
      This function performs a Bing Translate to translate the input text.
    </description>
    <example>
      =Ignite("bing","Translate","Text","Hello World", "en","fr")
    </example>
    <document>
      <![CDATA[
      <a class="doc" href="http://datamarket.azure.com/dataset/bing/microsofttranslator">Documentation</a> <a class="doc" href="http://msdn.microsoft.com/en-us/library/hh456380.aspx">Language List</a>
]]>
    </document>

    <inputs>
      <input name="text"  type ="input1"/>
      <input name="from" type ="input2" />
      <input name="to"  value ="en" type ="input3"/>
      <input name="ClientID" type ="config"/>
      <input name="ClientSecret" type ="config" />
    </inputs>
    <outputs>
      <output name="Text"/>
    </outputs>
  </func>

  <func name="Detect" endpoint="MANAGED" format="XML" >
    <description>
      This function detects the lanaguage of the text, using Bing Translate API.
    </description>
    <example>
      =Ignite("bing","Detect","Language","Hello World")
    </example>
    <document>
      <![CDATA[
      <a class="doc" href="http://datamarket.azure.com/dataset/bing/microsofttranslator">Documentation</a> <a class="doc" href="http://msdn.microsoft.com/en-us/library/hh456380.aspx">Language List</a>
]]>
    </document>

    <inputs>
      <input name="text"  type ="input1"/>
      <input name="ClientID"  type ="config"/>
      <input name="ClientSecret" type ="config" />
    </inputs>
    <outputs>
      <output name="Language" path=""/>
    </outputs>
  </func>

  <examples>
    <![CDATA[

<table border='1' class='ExcelTable2007'>
<tr><th class='heading'>&nbsp;</th><th>A</th><th>B (Forumla)</th><th>C (Output) </th></tr>
<tr><td class='heading' >1</td>
    <td>hello world</td>
    <td>=Ignite("bing","Translate","Text",A1, "en","fr")</td>
    <td>Salut tout le monde</td>
</tr>
<tr><td class='heading' >2</td>
    <td>hello world</td>
    <td>=Ignite("bing","Translate","Text",A2, "en","es")</td>
    <td>Hola mundo</td>
</tr>
<tr><td class='heading' >3</td>
    <td>Salut tout le monde</td>
    <td>=Ignite("bing","Detect","Language",A3)</td>
    <td>fr</td>
</tr>
<tr><td class='heading' >4</td>
    <td>Hola mundo</td>
    <td>=Ignite("bing","Detect","Language",A4)</td>
    <td>es</td>
</tr>
</table>
      ]]>
  </examples>

</ignite>