<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Translated Captions for Silverlight Videos – It is Dynamic!</title><link>http://blogs.msdn.com/b/aspnetue/archive/2010/08/13/translated-captions-for-silverlight-videos-it-s-dynamic.aspx</link><description>This post provides details and code about how to create dynamically translating video captions based on the browser language. By implementing the details in this post you can create the following: 
 
 A Web based solution that displays machine translated</description><dc:language>en-US</dc:language><generator>Telligent Evolution Platform Developer Build (Build: 5.6.50428.7875)</generator><item><title>re: Translated Captions for Silverlight Videos – It is Dynamic!</title><link>http://blogs.msdn.com/b/aspnetue/archive/2010/08/13/translated-captions-for-silverlight-videos-it-s-dynamic.aspx#10059529</link><pubDate>Wed, 08 Sep 2010 21:59:52 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10059529</guid><dc:creator>Erik Reitan</dc:creator><description>&lt;p&gt;Using WebMatrix, you could add a select box containing your two char language value and a submit button that posts back the page. When the page is posted back you could get the language value using @Request[&amp;quot;lang&amp;quot;] where &amp;quot;lang&amp;quot; is the name of the select box.&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s some sample code:&lt;/p&gt;
&lt;p&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;html&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;head&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/head&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;body&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;form method=&amp;quot;post&amp;quot; action=&amp;quot;&amp;quot;&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;@if (IsPost) { &amp;nbsp; &amp;nbsp; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;@MediaPlayerCC.GetHtml(&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;xapFilePath: &amp;quot;media/MediaPlayerCC.xap&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;mediaFilePath: &amp;quot;media/WalkthroughDynamicDataScaffolding.wmv&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;captionFilePath: &amp;quot;media/ExampleCaptions.xml&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;sourceLanguage: &amp;quot;en&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;newLanguage: @Request[&amp;quot;lang&amp;quot;],&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;translationAppID: &amp;quot;0993C13B8F696F9B1058DB64AA92E33AC841CFE9&amp;quot;,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;width: &amp;quot;100%&amp;quot;, &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;height: &amp;quot;800&amp;quot;);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;else {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;select id=&amp;quot;lang&amp;quot; name=&amp;quot;lang&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;option&amp;gt;en&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;option&amp;gt;es&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;option&amp;gt;fr&amp;lt;/option&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/select&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;input id=&amp;quot;Submit1&amp;quot; type=&amp;quot;submit&amp;quot; value=&amp;quot;submit&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/form&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/body&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;/html&lt;/p&gt;
&lt;p&gt;For the second issue, try first running on your local machine. Are you able to create the translated caption files using the code? If you are able to create the files on your local machine but not on your server, then your server may not allow your application to create files. I believe you could change that in IIS. If the files are being created but you do not see the translated text, make sure you are correctly pointing to your caption file. For this example code, you should place your media file, caption file and .xap file in the same directory. &lt;/p&gt;
&lt;p&gt;Erik&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10059529" width="1" height="1"&gt;</description></item><item><title>re: Translated Captions for Silverlight Videos – It is Dynamic!</title><link>http://blogs.msdn.com/b/aspnetue/archive/2010/08/13/translated-captions-for-silverlight-videos-it-s-dynamic.aspx#10059147</link><pubDate>Wed, 08 Sep 2010 05:34:47 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:10059147</guid><dc:creator>Hrishikesh</dc:creator><description>&lt;p&gt;Thnks it helps me alot but still i have few question&lt;/p&gt;
&lt;p&gt;1)I s there any &amp;nbsp;other solution for such multilingual support.Means can change caption language by changing value in Combobox?&lt;/p&gt;
&lt;p&gt;2)in your post you mention &amp;nbsp;&amp;quot;The code creates a new xml file for each language (caption.ja.xml, captions.fr.xml, etc.) &amp;quot; . but i could not able to see such a files in my server and even it&amp;#39;s not showing me anycaptions after doing process for multilingual&lt;/p&gt;
&lt;p&gt;reply ASAP&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=10059147" width="1" height="1"&gt;</description></item></channel></rss>