This is a migrated thread and some comments may be shown as answers.

Translating content

1 Answer 57 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Paul Lewis
Top achievements
Rank 1
Paul Lewis asked on 08 Jun 2011, 05:17 PM
Hi,

Im not sure if this is possible but thought it was worth an ask,

Im using the RichTextBox to visualize .docx files, I have a requirement for some translation of the files.  I like the look of the microsoft translator service http://sdk.microsofttranslator.com/SOAP/Translate.aspx but im not sure how to access the text content of the control to then put the api call in to translate it

Do you think this would be possible?

Thanks

1 Answer, 1 is accepted

Sort by
0
Mike
Telerik team
answered on 10 Jun 2011, 02:56 PM
Hello Paul Lewis,

Here is how you can export the content of RadRichTextBox to plaint text that you may then with this translation service:
using Telerik.Windows.Documents.FormatProviders.Txt;
 
...
 
public string ExportToTxt( RadRichTextBox textBox )
{
   TxtFormatProvider provider = new TxtFormatProvider();
   return provider.Export( textBox.Document );
}

More information about import/export and  format providers can be found here:
http://www.telerik.com/help/silverlight/radrichtextbox-features-import-export.html


All the best,
Mike
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Paul Lewis
Top achievements
Rank 1
Answers by
Mike
Telerik team
Share this question
or