Google geocode api language issue - php

I want to get the results of google geocode api in English language. I am using the following link. It is returning the results in arabic language.
Am I missing something ?
http://maps.googleapis.com/maps/api/geocode/json?latlng=24.744165,46.676800&sensor=true&language=en

try this
$results['address_components']->formatted_address ;

I already faced this issue, as far as I know, the API provide the result in the language you ask if available, otherway it use the avalible language. In your case I guess, that only arabic is available.
I'm sorry but I don't remember if it is clearly stated in the api documentation and where.
Have a look at this question: Inconsistent language in Google Place Details API
and at Google API documentation

Related

can you translate a text from english language to another language using Php?

i'm developing a website where most of it's customers are not English speaking, but i'm writing down it's details like, about us, how it works e.t.c, in English. So is it possible to translate an entire page from English to another desired language using Php, and how? Thank ya.
There is no any function from the PHP core that can do the "translate" thingy, but you can use API to achieve what you want to do. Here is the link to the Google translate API: https://cloud.google.com/translate/docs/
Tutorial of using the Google translate API: https://www.sitepoint.com/using-google-translate-api-php/

Using Google Maps API in Web Application

Basically all I want to do for now is just allow someone to enter an address and have it save the data in my database and display it on a Google map. Then when other people come to it, they can view the "pins" that other people have placed. Do I do all of the interaction with Google Maps using JavaScript? PHP?
I've done some searching and it isn't all that clear to me. Just looking for guidance on how to get started so I don't end up going back and changing things later on.
Google Maps is a client-side technology so you'll be using JavaScript. See this guide for getting started.
There are alot of tutorials on the web about the subject.
It is actually quite simple once you understand the API.
To get the pin's etc you can store them with php in MySQL and then to show the map just translate into values the API can understand.
Here is a good tutorial: https://developers.google.com/maps/articles/phpsqlajax

Google plus get Comments with PHP Code

I would like to read my Google Plus Feed with an php site and list all entrys in an array.... Now I found the explanation site of Google
https://developers.google.com/+/api/latest/comments/list
But I dont understand what I have to do?!? Can anybody give me a hint or an example, how to read my own newfeed from google + with an php coded site?
thank you in advance
regards Dennis
Well, I think it is better you to use the google-api-php-client which has methods to easily access content on Google Plus from PHP.
You may also want to check out the Google+ PHP Starter Project, which provides some configure and run code. One of the features demonstrated by this starter project is a list of your public activities.

Using Google Maps in PHP and SQL Server

Where can I find the tutorial or example to use Google Maps with PHP, SQL Server and JavaScript?
Example:
If I want to apply Google Maps into my website, which when the user key in the suburb name, then it will return the map of the suburb and show a mark for each of the locations of shops belonging to my company.
I used the tutorial "jQuery and Google Maps Tutorial: #1 Basics" to get familiar. It uses MySQL, but you could probably substitute it with SQL Server.
Here would be a good location to start:
Google Maps Examples
Just look into the source code of the examples, you're interested in. You can get far with just copy and paste.
EDIT: I just noticed, that I refered to the API v2, which is deprecated by now. You might better use the Tutorial for v3.
You can use the PHP class Easy Google Map.

How to use the Google SpreadSheets API to feed data to an application?

I've read through the Google Spreadsheets API PHP documentation. All examples are using Zend, which I cannot use. See this page: http://code.google.com/apis/spreadsheets/docs/1.0/developers_guide_php.html
Does anybody know a simple example of the following:
How can I use PHP w/ curl (or whatever) and the Google Spreadsheets API to get the data from a Google Spreadsheets Doc?
It's my understanding that the data will be delivered in XML format. From there, I'll use PHP to manipulate it.
Google is your friend! ;)
http://code.google.com/apis/gdata/articles/php_client_lib.html
http://sim.plified.com/2008/09/14/accessing-google-spreadsheet-with-php/
http://farinspace.com/2009/05/saving-form-data-to-google-spreadsheets/
From what I can see and how most of the other Google API work, the Spreadsheet API is centered around URLs. You formulate a URL and an xml response is returned. It seams that for this particular product however, most the support is for the Zend framewok implementation. You could always download the Zend component and reverse engineer it to work.
The Google Spreadsheets Data API is documented here.
http://code.google.com/apis/spreadsheets/docs/1.0/developers_guide_protocol.html
It's a REST API so you just need appropriately formatted GETS and POSTS as described in the docs.
The Zend Gdata implementation is the official PHP library for Google APIs. Not much of an answer I guess but I have to ask, why wouldn't you just use it? (It seems like you're reinventing the wheel... :-)

Categories