Toy Posted September 8, 2010 Share Posted September 8, 2010 If I hypoteticly have a website that only contains one word.. eh.. "Hello World". So.. my question is would I be able to translate this into other languages using.. the Google translate API for an example? So basicly I want to do is: Detect what country you're from (probably trought IP), translate the words "Hello World" to whatever language you're in. Is there any translate API's that does this? I don't really care about if it's going to be right spelled etc. I only have single words I want to translate! It would be really awesome! If not.. oh.. ! Link to comment https://forums.phpfreaks.com/topic/212905-translate/ Share on other sites More sharing options...
Psycho Posted September 8, 2010 Share Posted September 8, 2010 http://code.google.com/apis/ajaxlanguage/ Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1108894 Share on other sites More sharing options...
AbraCadaver Posted September 8, 2010 Share Posted September 8, 2010 http://code.google.com/apis/ajaxlanguage/documentation/#HelloWorld Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1108896 Share on other sites More sharing options...
Toy Posted September 16, 2010 Author Share Posted September 16, 2010 I've read throught those pages and I really haven't found exactly what i'm looking for. The script should just detect country and language by IP and translate certain words that I can select. Are you able to do this in Google Translate API? If so could someone please link the exact section about that. If anything knows how to do this don't hesitate to post.. Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1111831 Share on other sites More sharing options...
Andy-H Posted September 16, 2010 Share Posted September 16, 2010 You would have to use GeoLite Country to determine the users location from their IP, then use the Google translation API to translate to the language for that specific country. http://www.maxmind.com/app/geolitecountry Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1111834 Share on other sites More sharing options...
fortnox007 Posted September 16, 2010 Share Posted September 16, 2010 be advised that the translator for at least some languages is extremely crappy :-) Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1111835 Share on other sites More sharing options...
AbraCadaver Posted September 16, 2010 Share Posted September 16, 2010 Actually, the link I posted shows a Hello World example just like you asked for, as well as an example of Language Detection and Source Language Detection during Translation. Maybe you could use the scrollbar :-) Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1111837 Share on other sites More sharing options...
Andy-H Posted September 16, 2010 Share Posted September 16, 2010 Actually, the link I posted shows a Hello World example just like you asked for, as well as an example of Language Detection and Source Language Detection during Translation. Maybe you could use the scrollbar :-) Yes, but that detects the language that a given javascript string is written in, the OP wants to detect the location of the user and the predominant spoken language in that country, then translate the page to that language. If the OP already had the string stored in the language the user requires, the problem would not exist. Link to comment https://forums.phpfreaks.com/topic/212905-translate/#findComment-1111843 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.