473,835 Members | 1,879 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

English to Chinese conversion

32 New Member
Hi,

I am having 2 text boxes with label 'English' and 'chinese'.If i enter some English text in 'English' text box and press submit button.I need to display the chinese text for that English text in the chinese text box.and also for Vice versa

I don't know how to convert from English text to chinese text .Whether its possible to convert using PHP.

I saw some sample websites.They implemented this same functionality using 'JSP'.

I am looking for some help or source code from you guys

A.suresh
May 14 '07 #1
1 5278
pbmods
5,821 Recognized Expert Expert
Do you need to process the translated text, or do you just need to display the translation?

You could just pass your data as a parameter to Google's translate service:

Expand|Select|Wrap|Line Numbers
  1. $translation = file_get_contents("http://translate.google.com/translate_t?text=" . urlencode($_POST['text']) . "&langpair=en|zh-CN");
  2.  
Now, I've heard (though I can't prove) that Google's translate API isn't due out for a few years, so until then, I'm afraid that it's up to you to parse this monstrosity.

Here's the text you're looking for:
Expand|Select|Wrap|Line Numbers
  1. <input type=hidden name=gtrans value="...translated text here...">
  2.  
May 15 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1637
by: Tim | last post by:
Hello- I am creating an application in English, using English Windows 2000 using some VB code, for MS Access 2000 but the application will be used in China under CHinese Winodws. Will the English VB code execute properly under the Chinese Windows environment? Thanks very much.
0
1580
by: Bill | last post by:
I created a very simple DB with several forms and tables in chinese version of Access XP running in Chinese Win XP. Now I try to run the same DB in English version of Access XP running in English Win XP. The DB opens just find excpet all buttons or event on froms I click or do it gives me the following error. ______________ The expression On Click you entered as the event property setting produced the following error: A problem...
2
1849
by: Jack | last post by:
To whom may concern: In Asp.Net Calender control, how to display week days, like Wednesday as "Wed", Monday as "Mon", even my windows' region is set to Chinese? Thanks in advance! Jack 2005-10-11
5
2131
by: siLver | last post by:
Hi there, I need to create a asp page with fields like FirstName, LastName etc. But this 2 fields only allow the user to enter english characters, no chinese, no jap.. nothing else.. What is there that i must do to disable users from entering character other then English?? Thanx lotz..
2
2026
by: ad | last post by:
I use a TextBox for to enter an string. How can I determiniate if the stirng is Chinese or English?
0
983
by: larry | last post by:
I'm translating a web application from Chinese to English. When I opened source code, I found all Chinese strings were not displayed correct. It seems there is no encoding for Chinese. I went to Tools-Options-Environment-International Settings, but there is not option to add new language. Please help me. Larry
1
1934
by: suresh_nsnguys | last post by:
Hi, I am developing one application using PHP and MySQL.Right now my application supports English language.i like to integrate chinese language in my application.i like to implement similar to this website. http://www.dynasign.net.cn/dynasign/index.jsp 'Language' combo box contain 'English' and 'chinese',when user select 'English'.i like to display the page details in english and when he select 'chinese' i like to display page details...
12
2750
by: Steve Howell | last post by:
The never-ending debate about PEP 3131 got me thinking about natural languages with respect to Python, and I have a bunch of mostly simple observations (some factual, some anecdotal). I present these mostly as food for thought, but I do make my own continent-by-continent recommendations at the bottom of the email. (My own linguistic biases are also disclosed at the bottom of the email.) Nationality of various technologists who use...
0
1719
by: bvdb | last post by:
Hi Everyone, One of my customers lives in Taiwan and can only make my program work if he changes his Regional and Language Options to English from the Simplifies Chinese that his computer is normally set to use. Switching back and forth is very inconvenient for him. Is there a way that I can compile my program so that it works with the Regional Options set to Simplified Chinese? I set my PC Regional Options to Simplified Chinese,...
0
9802
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9652
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10517
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9343
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5632
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5802
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3990
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3086
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.