Forms Data Controls :: Translate Code To C#
Mar 17, 2011translate this code to C#?
[Code]....
translate this code to C#?
[Code]....
I want use Google API to Translate the English to Marathi and vice-versa.
View 1 RepliesI am using following code to add a google translator to my page header. But if I move it inside page content its not displaying anything. How to get the same translator box in iframe.
<div id="google_translate_element" class="langSwitch"></div>
<script>
function googleTranslateElementInit() {
[code]...
I am trying to translate a chart from a classic asp componant to a 3.5 chart control. I have two problems so far:
1) (hopefully easy) For the XAxis and YAxis titles (not labels), how do you make these titles bold?
2) (seems impossible with .net) How can I break up the background color so that certain parts of the background are different colors? In the legacy control, the original programmer could drill down control to the y-axis lines for coloring the background.
Example in a Y-axis with lines from 0-100 with 10 intervals:
a) 0-50: the background color would be BLUE
b) 50-80: the background would be GRAY
c) 80-100: the backgound color would be RED
As far as I can see, with the .net chart control, you can only have a single color or a single gradient of two colors, but not striped as I am trying to describe above. It seems that if an old classic asp componant has this striping functionality, the .net control has got to have it somehow.
using vb.net/asp.net 2005.
I am trying to set the border color of cells of my datagrid to an HTML color code: #c1c1c1
I have the following and would like to convert it so that it uses my color code and not the text of the color name, does anyone know the syntax? what I have is:
[Code]....
i am building a multi language website. static text i m translating using resource files, but data returned in dataset i am to bind with dropdownlist. i don't know how to translate that data and bind that. i have tried google translate element but it gives too many languages and i only need 3 or 4.
View 1 RepliesI'm looking to translate an SQL query into linq
INNER JOIN Usrs ON
SAQ.UserId =
Usrs.UserId AND Scan.UserId =
Users.UserId
I'm not sure how to include the "AND" in the LINQ statement.
I have the following LINQ query which works correctly:
[Code]....
The following query, however causes an error:
[Code]....
"Could not translate expression 'Table(t_f2f_event).Where(e => ((e.EVT_START_DATE > Invoke(value(System.Func`1[System.Nullable`1[System.DateTime]]))) && (e.EVT_START_DATE < Invoke(value(System.Func`1[System.Nullable`1[System.DateTime]])))))' into SQL
and could not treat it as a local expression."
I have a number of radio buttons on my page. When one is selected, I wish for certain controls to be made visible/invisible.
Can anyone tell me the property to code in VB behind code?
how i can rewrite url like this?translate.google.com/?hl=en
with out .aspx(or php)and with ?
like rewrite url www.mydomain.com/showcontent.aspx/pageid=1
www.mydomain.com/page/1 or like this
i m a beginner with visual studio 2005.i have a input file on a page, this input file displays a bouton with a text : "browse..."i'd like to display another text on this button !
View 1 RepliesIm trying to make some BBCode-translation from textarea, but im stuck on translate list to html. I have this fo Bold text:
[Code]....
But how can i do if i want to translate this:
[Code]....
I use simple default route
routes.MapRoute(
"Default",
"{controller}/{action}/{id}");
The problem is that I want to translate some paths in my language but names of the controllers and actions should be leaved in english. For example I want to map URL "/wydarzenia/4/rejestruj" to "/events/4/register'. I tried
routes.MapRoute(
"Register",
"wydarzenia/{id}/rejestruj",
new { controller = "Events", action = "RegisterToEvent" });
But this doesn't work.
I have defined a property in a masterpage in vb.net.
I want to use the same code in a C# project, but I have no idea how to translate it. And yes Ive seen pages like: [URL]
and [URL]
Here's the code:
Public Property BreadCrumb() As String
Get
Return lblBreadcrumb.Text
End Get
Set(ByVal path As String)
Dim BreadCrumbBuilder As New StringBuilder
BreadCrumbBuilder.Append("<li><a title=""Home"" href=""/"">Home</a></li>")
If path <> "" Then
Dim a As Array = path.Split(";")
If a.Length = 2 Then
BreadCrumbBuilder.Append("<li class='active'><a href='" + a(0).ToString + "'>" + a(1).ToString + "</a></li>")
Else
Dim sfriendlyURLBuilder As New StringBuilder
For i As Integer = 0 To a.Length - 1
If i Mod 2 = 0 Then
sfriendlyURLBuilder.Append(a(i))
ElseIf i Mod 2 = 1 And i < a.Length - 2 Then
BreadCrumbBuilder.Append("<li><a href='" + sfriendlyURLBuilder.ToString + "'>" + a(i).ToString + "</a></li>")
Else
BreadCrumbBuilder.Append("<li class='active'><a href='" + sfriendlyURLBuilder.ToString + "'>" + a(i).ToString + "</a></li>")
End If
Next
End If
End If
lblBreadcrumb.Text = BreadCrumbBuilder.ToString 'globalfunctions.BuildBreadCrumb(path)
End Set
End Property
I want to change my project to use razor syntax. How do I translate a view to razor syntax?
also, when I add a new view, I don't see an option for the view engine to use. Is there one?
I have developed a large business portal. I just realized I need my website in another language. I have researched the solutions available like
Used third party control on my website. (Does fit in my design. Not useful regarding SEO point of view. Dont want to show third party brand names.) Create Resource files for each language.( A lot of work required to restructure pages to use text from resource files. What about the data entered by the user like Business Description. )
I was thinking of a solution like a when a page is created on server side then I could translate it before sending back to client. Is there any way I can do that?(to translate everything including data added from databases or through a code. And without effecting design. )
I am working on globalization project.In my search.aspx page I have PagedGridview.I has property called EmptyDataText which is set to "NoResults".(EmptyDataText="No Results")
How can I translate "No Results" Within EmptyDataText?I tried to create key both global and local resource file.
In my local resource I tried in search.aspx.fr-FR.resx I have
key called Search and its value is No Resu'dfd .Then in gridview I tried like
EmptyDataText=<%=GetLocalResourceObject("Search")
%>
But it is not working.
Then I tried using global resource
EmptyDataText=<%=Resources.Product.Seacrh%> where Product is resx(class)
<util:PagedGridView
ID="product"
runat="server" AllowPaging="true"
EmptyDataText="No Results"
AllowSorting="true"
PageSize="10"
OnPageIndexChanging="PageSearchResults"
AutoGenerateColumns="false"
OnRowCreated="HandleHeader"
>
I tried some online transtation sites as well but I get different results that makes me unsure which one I should use. spell for me a text of Login button in French (for a User Name/Password page with the Login button).
View 3 Replieshow to translate the numeric to arabic numbers in label.. anyone?
here's my code:
passportlabela.Text = "" + drReaderb["DOC_NUMBER"].ToString() + "";
i want to translate the doc_number = 12345 in arabic numbers
We use HttpContext.Current.User.Identity.Name to resolve the name of the currently loggen in user in the intranet sites we develop. Normally this works adequately, but we've recently encountered problems when installing an intranet on an IIS7.5 Server. The weird thing is that ASP.NET throws an error when executing an extremely simple page for debugging purposes:
<%@ Page Language="C#" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL]/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
</script>
<html xmlns="[URL]/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<%= HttpContext.Current.User.Identity.Name %>
</div>
</form>
</body>
</html>
The error is:
[Code]....
[IdentityNotMappedException: Some or all identity references could not be translated.] System.Security.Principal.SecurityIdentifier.Translate(IdentityReferenceCollection sourceSids, Type targetType, Boolean forceSuccess) +309 System.Security.Principal.SecurityIdentifier.Translate(Type targetType) +125 System.Security.Principal.WindowsIdentity.GetName() +154 System.Security.Principal.WindowsIdentity.get_Name() +42 ASP.test_default_aspx.__Renderform1(HtmlTextWriter __w, Control parameterContainer) in c:inetpubwebsitewwwroot extranet estdefault.aspx:16 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +115 System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253 System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87 System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53 System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240 System.Web.UI.Page.Render(HtmlTextWriter writer) +38 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240
The beauty of it all is that an old school, classic ASP page that basically does the same thing doesn't throw an error, but just does what it has to do:
<%
response.write "Remote User: " & Request.ServerVariables("REMOTE_USER")
%>
This code simply delivers the name of the remote user. But the ASP.Net version doesn't deliver. The same server, same directory, same user. Different ASP version. Does anyone have an idea?
I have included googles provided google translate script on websites home page, all it translated is just teh home page not the other pages on the website.I read about googletranslate.api, does any one has any info or an example how to embed teh google translate.api translate feature to whole website.
View 1 RepliesI have XML files that I would like to translate autamaticallly using google API.
Do you have good tools that do so?
We have a requirement wherein we need to translate all dynamic pages(i.e database driven pages) to Chinese language. Does .NET provide any API for this, or there are third-party APIs for the same. Which third-party is best recommended?
View 2 RepliesIs there any way to install google plugin's in .net. for e.g. if chinese wan't there content should display in there language then it should display on one click
View 1 RepliesIs there a way to translate things which are sitting in Microsoft.Web.Helpers.dll? For example: to upload file tghe FileUploadHelper gets called and user is presented with two edit boxes plus 'Browse...' and 'Upload' buttons and 'Add more files' label - all this I'd like to translate as it looks really weird if I mix the languages on website.
View 3 Replies