Auto translating website using Google Translate - translation

I need to find a way to translate a website to the appropriate language as the locale settings on a users machine. So in otherwords someone from Germany visits my site, his locale settings are GErman, nou the site displays in German, is this possible to do using Google Translate or are there other options available?

Use Follwing code in your head tag
<script>
function googleTranslateElementInit() {
new google.translate.TranslateElement({
pageLanguage: 'en',
layout: google.translate.TranslateElement.InlineLayout.SIMPLE
}, 'google_translate_element');
}
</script><script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
display laguage dropdown where you want to display it
<div id="google_translate_element"></div>
If use only some languages translate than use
pageLanguage: 'en',
includedLanguages: 'pt,ar',

I know that when I visit a site in another language using Google Chrome, it says "This site appears to be in [Drop Down With Languages]. Do you want Google to translate it?" They might have an api that can do that per page.
However, if your site is at all professional, you should get someone to actually translate your site for you, as occasionally Google translate fails in embarrassing ways.

Related

iOS translation apps url schemes

I'm trying to enable translating some text in my app. I want user to be able to launch whichever translation tool they use on their device (Google Translate or iTranslate) and see the translation without having to type it. For this, I'm using the url schemes:
googletranslate://
itranslate://
Now, I need to pass the query to those apps. I know how to do this for iTranslate:
itranslate://translate?from=auto&to=en&text=<encoded_string>
This is cool, now I would like to know how to do the same for Google Translate. It needs to automatically detect the language and translate it to english.
It is not currently possible to prefill UI elements in the Google Translate iOS application when opening it from googletranslate:// URLs. The contents of the URL after googletranslate:// appear to be completely ignored. So the most you can get from using these links at the moment is opening the iOS application.
If this does get implemented at some point in the future, one can test by opening a link like googletranslate://example%20text/?param=value&from=zh_TW. I would strongly recommend that you let your voice be heard on the Google Translate product forum by requesting this feature.
In the meantime, you may want to consider using Translation API to provide translations within your application. This can be achieved using the REST API.
If is there anyone still looking for the answer, you can use it like this.
googletranslate://?sl=en&tl=tr&text=hello%20world
You can change the parameters
sl = source language
tl = translation language
text = the thing you want to translate

Multilingual website and url redirection to the default language chosen by me

I have a website with two languages, English and Russian. My domain url for each language will be as such:
www.mydomain.com/en/
and
www.mydomain.com/ru/
How do I redirect visitors to www.mydomain.com/en/ when they type: www.mydomain.com
How will my url be shown in google search, will it be shown as:
www.mydomain.com
OR
www.mydomain.com/en/
I cannot give you the answer on how you have to redirect visitors to the right domain (from a technical point of view). That depends on the system (WordPress, Joomla, Magento or none at all) and the programming language you use (PHP, ASP.Net).
Edit: how to determine what language to show:
There are two ways to determine what language version to redirect your visitors to. You can base it on the browsers' language using the Accept-Language request header or you can get the location from the user's ip address and use the main language of that country. Maybe a combination of both would be the best solution.
I can however tell you how your URL's will be shown in Google. First you have to decide how you want Google to show them.
Some sites use their domain root (www.domain.com) as a simple page where users can define the language, and send them to the right language folder (www.domain.com/en/ or www.domain.com/ru/). Others use their domain without a language folder as the version for the main language of their country and use folders for other languages.
Two other solutions are to use subdomains (ru.domain.com or de.domain.com) or to use different domains (www.domain.com and www.domain.ru) for all (other) languages.
Which way you choose, make sure you never have two versions of one language! For SEO reasons, you cannot have the English version on www.domain.com AND www.domain.com/en/.
Once you have chosen your way of serving (other) languages, you have to tell search engines what language you webpage is in. You can also link to the same content in other languages. Put the following tags in the <head></head> section of your webpages:
<head>
<meta http-equiv="content-language" content="nl_NL">
<link hreflang="en" href="http://www.domain.com/ru/" rel="alternate">
</head>
Also adjust your <html> tag:
<html lang="nl"><head>...</head><body>...</body></html>
Edit: How to get your different versions in Google
When using different (sub)domains, you can notify Google about all of them Google Search Console (new name of Google Webmaster Tools). If you prefer to use folders, you can add your main domain to Google Search Console and let your <link hreflang="..." ...> tags do the work for you. You also might want to make seperate sitemaps for each language and notify Google about them in Search Console.

ASP.NET MVC 3 multilingual SEO

I'm currently writing an ASP.NET MVC 3 web application that supports multiple languages.
I already managed to translate all the routes so that calls like:
www.mysite.de/Kontakt and www.mysite.de/Contact will route to the same Controller/Action.
By design it is so that when calling www.mysite.de the language (stored in the session object) will automatically be set to a default language (here German). The navigation of the site is then dynamically setup accordingly.
The language in the session object can be changed by either hitting the "English version" link or when manually calling e.g. www.mysite.de/Contact. In this case it is recognized that the link (/Contact) matches a route that is
defined as English and so I change the language in the session object to English. Of course the content of the sites is also localized.
My question now is how does that cooperate with SEO, especially with Google?
I already add the Content-Language meta tag dynamically to each page. So I think that with a proper sitemap.xml should be sufficient.
Does Google recognize this correctly? Is it when searching Google in German that I get "Kontakt" as result and "Contact" when searching in English?
Another issue is what happens when the link is the same for different languages? E.g. the link to "Jobs" would/could be the same as well in English as in German.
I hope that the question is understandable as my issue is rather complicated.
Cheers,
Simon
Google does not only rely on you telling them what language your site is in, you only hint them.
The pages will be analyzed and presented as a page in "German" or a page in "English" based on the language of the content.
But your base assumption is correct.
Yes, if I search for your page in German, and Google has indexed the page as a page in German, Google will return Kontakt.
As for your second question, unless you provide another mean to change the language other than the path (query string or language in browser setting), those links will only be in your default (German) language.
If you would like them to appear in english, use a different, additional URL: Jobs-EN that you only have in your SiteMap.xml (and route, of course).
Another issue is what happens when the link is the same for
different languages? E.g. the link to "Jobs" would/could be
the same as well in English as in German.
You might consider having the language as part of your URL, for example:
www.mysite.de/de/Kontakt
www.mysite.de/en-us/Contact
www.mysite.de/en-gb/Contact

how is language translation done in facebook?

i would like to know, how is the language translation done in facebook ?
Are they using google translate, or any licensed software ?
I want to enable language translation in my website, and i want similar to that of facebook.
How Can this be done, if at all possible ?
Google has good translation API that will convert your text in to given language. However if you want to translate a larger paragraph you need to go for human translation. Because Google translation is not converting grammar of other languages. Now there are good services available that allow automate the human translation like http://mygengo.com/
Facebook's partner for search and for translate functions is Microsoft Bing.
To use it similarly you need to use the API provided, see 'Translator' here at their Developer page:
http://www.bing.com/dev/en-us/dev-center
Source of my info: several websites including
http://translation-blog.multilizer.com/how-to-use-facebook-translate-button/

is there a site offering a localised overview of all alternative browsers

I would show IE6 visitors a site with limited css (Progressive Enhancement) but would also like them to gently show a header informing them they can/should upgrade to a modern browser. There are initiatives out there, like ie6nomore, who do just that. But the list of modern browsers and the headertext is hardcoded.
My site is localised, so I rather have a link to an external website, that autodetects their browser language, and informs them of modern browsers in their own langauge.
That way my 'advice' will always be up to date and fully localized.
It's not a complete list, but Microsoft had to setup a browser choise page which shows the top 12 browsers, based on market share. This list will be re-evaluated every six months.
You can read more about this here:
Browser Choice FAQ
So if you detect an old browser, you could display a nice message and a link to this page.
Hope that helps.
At least safari goes directly to the windows download, so its not really a universal solution.
And its only in english.
The browser landingpages are available in all languages, so so should be the browserchoice page. Unlike firefox and chrome apple doesn't have an auto browser language detecting landingpage, so I rerouted it via google search to achieve that.
(why can't I add this as a comment to the previous post?)

Resources