I have been looking around the internet for a script which would use google translate api to translate a website automatically through a geoip script without the need of clicking translate button. Since google does provide a small div snippet which you can add to your website and then through a drop down menu you can choose the language and click translate and it translates the whole website.
the snippet is here
http://translate.google.com/translate_tools?hl=en&layout=1&eotf=1&sl=ru&tl=en
How can i integrate a geoip script along with the above snippet or there are also a couple of google translate scripts available on the internet.
Using geoip to determine user's language is not optimal way, because people may speak/prefer different language than the main language in their geographical location.
Accept-Language header sent by client is something you would like to use, but it's not available in javascript (at least in any standard way).
However, there's available navigator.language which tells us the language of browser UI. Though not ideal, this is very easy to implement:
Translate
Related
I hosted a website and included a Google Analytic tag in it to count the visitors. The website itself is kinda empty and has no purpose other than trying out Google Analytics.
It seems like Google Analytics can somehow find out if i visit the website via a proxy and doesnt add this visit to the visitorcount. It doesnt matter if i use the proxy directly in the browser or via a java framework like HtmlUnit or Selenium.
The frameworks and proxys themself are working, i checked it at websites like whatismyip dot com. The Analytic tag is also working, since it correctly adds normal visitors to the visitorcount.
So my question is: how does Google Analytic find out someone is using a proxy? As far as i know the only indications someone is using a proxy are in the HTTP-Headers (X-Forwarded-For tag and so on). But the JavaScript which is included in my site shouldnt have access to the HTTP-Request, right?
I used free proxys which can be found if you google "free http proxy list" or similar keywords. Does Analytic automaticly downloads and blacklists those IP-Adresses? Because i canot imagine any other way it can find out someone is using a proxy just via Javascript.
If you tick "Exclude bot" in View settings it may be that Analytics recognizes those IPs as spam sources. Since these proxies are free services they can be used frequently for this purpose by malicious people and Google has blacklisted them.
I have an application where I'd been asked to support Google sign-in. Something we've tried to do since the beginning was not require javascript for any important functions. Is it possible to perform Google Sign-in without requiring Javascript?
I've read some of the guides such as https://developers.google.com/identity/sign-in/web/sign-in and https://developers.google.com/identity/sign-in/web/backend-auth, but they all seem to have a javascript component involved.
For example, can we use only links and redirects, etc. to accomplish a Google-based authentication, along with some server-side verification?
I think what you want to do is described in the OAuth 2.0 for Server-side Web Apps documentation. Several of the sections in that doc have tabs with language specific examples and there is also an HTTP/REST tab that shows how to generically use Google's OAuth URls.
You will also want to follow Google's sign-in branding guidelines.
I've been looking for the same thing. I'm sick of popups and I don't want them in my site. It seems like there should be a way to just link to a Google page, then redirect the user back to my site. However there doesn't seem to be any documentation about how to do that.
I also agree that it shouldn't matter what programming language is being used. Google doesn't need to know that. All we need is a URI to send the user to, and some way to indicate where the user should be redirected back to.
We have just moved to drupal and are trying to pro-actively identify all broken external web (http://, https://) links.
I've seen some references to validation of links but wasn't sure if it only meant validation of the syntax of the link as opposed to whether these web links work or not (e.g. 404).
What is the easiest way to go through all web links in a drupal site and identify all of the broken external web links? This is something we'd like to automate and schedule every day/week.
As someone else mentioned, use Link Checker module. It's a great tool.
In addition, you can check the Crawl errors in Google Webmaster tools for 404'd links like this:
Clicking any URL from there will show you where the URL was linked from so you can update any internal broken links. Be sure to use canonical URLs to avoid that.
Make sure you're using a proper internal linking strategy to avoid broken internal links in the first place, too: http://www.daymuse.com/blogs/drupal-broken-internal-link-path-module-tutorial
Essentially: use canonical, relative links to avoid broken internal links in the future when you change aliases. In simple Drupal terms, be sure you're linking to "node/23" instead of "domain.ext/content/my-node-title" since multiple parts of that might change in the future.
I have not found a Drupal based approach for this. The best, free piece of software I've found for finding bad links on sites is Screaming Frog SEO Spider Tool.
http://www.screamingfrog.co.uk/seo-spider/
I'm working on a Wordpress site that uses the plugin Get Directions.
It works properly and gives me the directions in English, but I want to recieve them in Dutch.
I've tried changing the URL from maps.google.com to alternatives like maps.google.nl and maps.google.com?language=nl-nl
Does anyone know how I can get the directions in Dutch? I have also asked on the official Wordpress forums but I don't know how long it usually takes for them to respond.
Seems impossible. The plugin uses the API URL http://www.mapquestapi.com/geocoding/. And checking the documentation, there is a locale parameter for the /directions Web Service, but nothing like this exist for the /geocoding Web Service, which is the one the plugin uses.
Note that the standard locale codes are in the format language_COUNTRY, eg, nl_NL. I tried to modify the plugin code adding &locale=nl_NL(and other languages), but it made no difference.
I have written a page and need to test it locally.
How can I see the result of my development site served from my local machine using Google's "Fetch As Google" feature in Webmaster Tools?
(disclaimer: more of a comment than an answer)
This is an excellent question and there are amazingly little sources on the web for a solution.
Fetch Google Bot - http://www.google.com/support/webmasters/bin/answer.py?hl=en&answer=158587
The Fetch as Googlebot tool lets you
see a page as Googlebot sees it. This
is particularly useful if you're
troubleshooting a page's poor
performance in search results. For
example, if you use rich media files
to display content, the page returned
by the tool may not contain this
content if Google can't crawl it
effectively. You can choose to fetch a
page as Google's regular web crawler
sees it or, if you publish mobile
content, as our mobile crawlers do.
I followed the link above and tried out User Agent Switcher but it doesn't accomplish what the asker is looking for. See this thread: chrispederick.com/forums/viewtopic.php?id=788
You can change the user agent settings
to be the same as GoogleBot, for
example, but I'm not sure if sites
also change their appearance based on
the headers the search bot sends.
Changing the headers is beyond the
scope of the extension, however.
And chrispederick.com/forums/viewtopic.php?id=259
Q
For example if i put googleBot i'd
like it to customize that it would be
emulate Google's spider.
A
The User Agent Switcher has always
been designed to be a simple,
light-weight solution so I'm not
planning on adding anything like this.
In short I don't think there is a solution. This would be a great opportunity for a google app
Do you mean you want to see how your site will react to the google web crawler?
For this you could use Firefox with the User Agent Switcher addon.
In order to test your localhost website with the official Google tools, you can use Ngrok as i described in this post : https://www.aymen-loukil.com/en/blog-en/how-to-test-localhost-website-with-google-seo-tools/
Fetch as Google is not possible to use directly with non verified domain in Google Search Console (Webmaster tools). A trick to view it, is to iframe your Ngrok URL in a another verified domain.
- you should have a website verified in Search console
- Make an iframe that loads your Ngrok URL of your localhost webpage
Ngrok + Fetch as google combination is great, but you will need to go through the verification process each time you launch ngrok on the google tools side.
In my case I just needed to check if server side render was properly done, just went to google Chrome navigator settings and disabled javascript:
Settings >> Advanced >> Content Settings >> Disable >> Javascript Allowed (off)
It allowed me to check that the page was being 100% rendered in the server side(nextjs server side rendering) and no JavaScript render was being run on the client side.