|
Hi,
I want to translate my web's english content to chinese.
Whats the easiest and best method to do this?
If you have any suggestions, let me know.
siva
|
|
|
|
|
Hi Shiva,
I.System.Globalization does not deal with content/text translation.
II.Below is one of the translation site.
http://babelfish.altavista.com/
III.I do not know whether you are aware about the translation sites / engine or not, that is why I would also like to add the below points
1.there is no site(translation engine), which gives you 100% correct translation.
2.Words meaning changes with the subject and the context, it is being used. for example
the word "link" has defferent meaning in computer terminology and in business context.
3.There are various other factors, I am unable to list up here, but I would like to advice you that before using the translation sites for translation, use very very simple and small sentances, that will give you better result.
Regards,
Jay
|
|
|
|
|
Siva's Reply
>Hi,
>
>I dont want to try out translation software who ask for huge sums of money
>
>any other ways of doing it?
>
>thanks for your help
>siva
>
>
>
>---------------------------------
>Do you Yahoo!?
>New and Improved Yahoo! Mail - Send 10MB messages!
Jay's Response:
Hi Shiva,
1.One tip I want to share with you, Please do not reply to reminder mail which comes to your mail box through this message board. Reply from here, using the Message link. This helps to get the information(using search), if some one faces the similar problems.
2. The link I had given you is free site for translation. you can search in google for others.
3. I do not know what other ways you want to achieve the same????? Please elaborate your point. Others can also give you some ideas....
Regards,
Jay
|
|
|
|
|
As mentioned by Jay already there are free translation web sites. However their translations are not accurate. Often they will mistranslate things because they don't fully understand the context.
There are also paid for services where actual real humans are involved who will ensure that the context is correct for the translation. This costs money.
If you don't want to pay money then the content of your site will be badly translated.
sivass78 wrote:
Whats the easiest and best method to do this?
The easiest method is to use an online translation service.
The best method is to get a human to translate it.
You are going to have to make a decision - do you value quality over cheapness?
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Colin,
I want to explore .NET and use system.globalization wherein msdn promises much more features for globalization of code.
however, the site is not a professional one and want to try out a simple translation without money. would you?
if you have any valid ideas let me know.
|
|
|
|
|
Then you don't need a translation service, paid for or free.
You just need to provide text that you can see the difference depending on the culture
For example you could set up localised resources for a button that says:
"Hello in English
"Hola" in Spanish
"Bonjour" in French
or if it is just for testing prefix everything with the language code or some other identifier so that you can see that it is working.
If it is for testing the translations could be nonsense text for all the .NET Framework will care. Just so long as you can see the code working then there is nothing else to do.
If you must use real translations then just copy the desired resources from my article on internationalisation http://www.codeproject.com/netcf/hangman_dncf.asp[^]
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
Hi Colin,
Sorry to disturb in between the conversation. I can make out that Either we are unable to understand what Shiva wants or he is missing basics of System. Globalization namespace and its classes?
I do not know how to convince him about our ideas?
Regards,
Jay
|
|
|
|
|
Jay_sh_s wrote:
I do not know how to convince him about our ideas?
I am sure it will click eventually.
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
Can't manage to P/Invoke that Win32 API in .NET? Why not do interop the wiki way!
|
|
|
|
|
I have a piece of code that recursively goes though all internal nodes of an xml document and prints out the Name of each node. However, whenever I try to print out the Value of the node, it is always null . Why is it always null ?
#region Using directives
using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;
#endregion
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
try
{
XmlDocument doc = new XmlDocument();
doc.Load("C:\\store.xml");
XmlElement root = doc.DocumentElement;
LoopThroughChildren(root);
Console.Read();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}
}
public static void LoopThroughChildren(XmlNode root)
{
Console.WriteLine(root.Name + " - " + root.Value);
foreach (XmlNode n in root.ChildNodes)
{
if (n.NodeType == XmlNodeType.Element)
{
LoopThroughChildren(n);
}
}
}
}
}
/\ |_ E X E GG
|
|
|
|
|
When an xml node with text is loaded up into a dom, the text is not added as part of the element, but is added as a seperate child node of type text.
So something which looks like <MyNode>Hello</MyNode> in an xml file, would be represented within the dom as
Element Node - Name: MyNode
---- Text Node - Value Hello.
So when looping round the dom, to get the value of the MyNode element you need to access to first child and get it's value. root.firstChild.Value.
Or use the most helpful Text property instead root.Text.
Hope this helps....
|
|
|
|
|
Ah, thank you. I should have realized that. Also, you seem knowledgable about the xml dom. I have another question for you. Do you think it is wise to load a 50MB xml file into the dom? Is that pushing the limits? I do this at home and it can load it all in about 5 seconds, but here at work on a slower computer, it takes too long to wait for. I don't think I really need to use the dom eather, I'm not using any special funcitons from it. I think I should use the XmlTextReader instaed. What do you think?
/\ |_ E X E GG
|
|
|
|
|
I want to use the XmlTextReader instead of the XmlDocument. How can I use the below method with the XmlTextReader?
public void LoopThroughChildren(XmlNode root)
{
this.listBox1.Items.Add(root.Name+ " \t\t\t"+root.FirstChild.Value);
foreach (XmlNode n in root.ChildNodes)
{
if (n.NodeType == XmlNodeType.Element)
{
LoopThroughChildren(n);
}
}
}
I can't get an XmlNode out of the XmlTextReader....
/\ |_ E X E GG
|
|
|
|
|
It really depends on what you are trying to do with
the xml document.
A 50 MB document loaded into the DOM is quite big, but if you want to edit it then you will have to.
From what I cal tell though all you really want to do is read the document and add the element's name and text value to a list.
The XmlTextReader is ideal for this, as it is only reading a stream, and not creating objects in memory for each node, However this is not going to return you XmlNode's as it is not a dom implementation.
Take a look at the documentation, you will need to call Read() to move along each element, then you can access the Name and Value property of the XmlTextReader to get the data you want I think.
|
|
|
|
|
Hello,
Now, I tried to develop XMLWebService using C#.
This have a function managing data from/to Oracle database(10g).
But I think about database transaction.
(for example, I execute some stored procedure at the same time
(or without a break). After executed them, issue commit or rollback.)
So, I would like to use MTS, so I think it will manage it.
I am looking for some informations of it, but it is a few.
If you have some informations, how to do, alternative ways,
please tell me.
I have a trouble...
best regards,
yu-yu
|
|
|
|
|
hi all, in vs.net, how do you make a scroll bar automatically drop to the bottom of a multiline textbox?
its for my chat program, and scrolling down every message is getting annoying >=(
|
|
|
|
|
Refer the below code
const int SB_VERT = 1;
const int EM_SETSCROLLPOS = 0x0400 + 222;
[DllImport("user32", CharSet=CharSet.Auto)]
public static extern bool GetScrollRange(IntPtr hWnd, int nBar, out int lpMinPos, out int lpMaxPos);
[DllImport("user32", CharSet=CharSet.Auto)]
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, int wParam, POINT lParam);
[StructLayout(LayoutKind.Sequential)]
public class POINT
{
public int x;
public int y;
public POINT()
{
}
public POINT(int x, int y)
{
this.x = x;
this.y = y;
}
}
int min, max;
GetScrollRange(richTextBox1.Handle, SB_VERT, out min, out max);
SendMessage(richTextBox1.Handle, EM_SETSCROLLPOS, 0, new POINT(0, max - richTextBox1.Height));
|
|
|
|
|
I have a class inherit from usercontrol, If a user at ime mode, the KeyDown Event can only receive the first key code, others are gone? How to get full strings? thanks!
|
|
|
|
|
1.I did not get what really the problem is? can you post the keypress event code.
2.Just to remind you,when ever Key is Pressed, the event gets fired and it gives one keycode at a time. that is what it is doing in your case?????
|
|
|
|
|
How to convert this into c#?
If File.Exists(filepath)Then
Dim filename As String = Path.GetFileName(filepath)
Thank You
|
|
|
|
|
string filename;
if(File.Exists(filepath)
{
filename = Path.GetFileName(filepath);
}
|
|
|
|
|
hi,
try
{
string fName="";
if(File.Exists(@"C:\sree.rtf"))
{
fName=Path.GetFileName(@"C:\sree.rtf");
MessageBox.Show(fName);
}
else
{
MessageBox.Show("File Does Not Exists");
}
}
catch(Exception Ex)
{
MessageBox.Show(Ex.Message.ToString());
}
**************************
S r e e j i t h N a i r
**************************
|
|
|
|
|
Thanx for ur contribution!;)
|
|
|
|
|
Hello,
What I want to do I allow the user to move/resize some of the controls on the form.
For example, if there is a textbox, the user would be allow to move it and resize it. Do I just monitor the mouse move event and check if it is within a certain distance of the textbox, and if it is, change the cursor to a gripper, and then, if the mouse is clicked, just change the width/height of the textbox accordingly?
Any ideas/suggestions are welcome
Thanx,
-Flack
|
|
|
|
|
I had the practice code for moving the controls. I am pasting the same for your reference. I do not know whether it would help you or not?
using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
namespace WindowsApplication1
{
public class Form2 : System.Windows.Forms.Form
{
private System.ComponentModel.Container components = null;
public Form2()
{
InitializeComponent();
}
protected override void Dispose( bool disposing )
{
if( disposing )
{
if(components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}
#region Windows フォーム デザイナで生成されたコード
private void InitializeComponent()
{
this.button1 = new System.Windows.Forms.Button();
this.SuspendLayout();
this.button1.BackColor = System.Drawing.SystemColors.Window;
this.button1.Cursor = System.Windows.Forms.Cursors.IBeam;
this.button1.ForeColor = System.Drawing.SystemColors.WindowText;
this.button1.Location = new System.Drawing.Point(136, 96);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(104, 88);
this.button1.TabIndex = 7;
this.button1.Text = "button1";
this.button1.MouseUp += new System.Windows.Forms.MouseEventHandler(this.button1_MouseUp);
this.button1.MouseMove += new System.Windows.Forms.MouseEventHandler(this.button1_MouseMove);
this.button1.MouseDown += new System.Windows.Forms.MouseEventHandler(this.button1_MouseDown);
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(608, 382);
this.Controls.Add(this.button1);
this.Name = "Form2";
this.Text = "Form2";
this.ResumeLayout(false);
}
#endregion
[STAThread]
static void Main() { Application.Run(new Form2()); }
private System.Windows.Forms.Button button1;
int MoveFlag = 0;
private void button1_MouseDown(object sender,
System.Windows.Forms.MouseEventArgs e)
{
MoveFlag = 1;
}
private void button1_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
MoveFlag = 0;
}
private void button1_MouseMove(object sender,
System.Windows.Forms.MouseEventArgs e)
{
if (MoveFlag == 1)
{
button1.Location = (new Point(button1.Location.X+e.X,
button1.Location.Y+e.Y));
button1.Refresh();
}
}
}
}
|
|
|
|
|
Hi guys,
I need to build a small application that will browse a website automatically. It needs to authenticate itself by using a form post, then a session id is given by the server, and I need to keep that session open for everything I'll do thereafter (or I'll be brought back to the login page).
I'm not quite sure where to start to achieve such a thing. Can anyone help?
Thanks!
Carl
|
|
|
|