iOS translation apps url schemes - ios

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

Related

String saved in IOS app, accessible from web browser. Best method?

As the title says, I'm looking for a string to be input in an IOS app and stored in a way that it would be accessible from a web browser.
Both editable and readable from web and the app.
From initial googling, I've come across Dropbox Datastore API but it is being deprecated.
What would be a good alternative for this?
Your intentions are quite scant. However, I assume you want a little more than just reading and writing a string. Inferring a bit more context, you should look at Apple's CloudKit.
It has API for iOS, OS X, and apparently now javascript. See this link for more details.
You need some code running on a server and a database to save the string, with an API to access this string from a client.
FireBase is probably the simplest drop in solution since it gives you a very basic example and a web based UI for testing (plus it updates in realtime)

How iOS Google Now can show different card template

I wanted to know the technology decision behind the iOS Google app.
As we can see, in the app's Google Now feature it renders many different card templates for different scenarios, and those templates seems to be very flexible based on server inputs.
I was wondering if this is implemented all based on HTML5? or they just have many templates built in and render them locally? I'd vote for the HTML5 route but not sure if this still involved some native code to make it more responsive?
Thanks!
As we (well, most of the community) are not Google employees we can't tell you what they really did, but I'd say that it is possible to do this dynamically in the app.
We did develop something similar that responds to definitions sent by the server and transforms them to custom designed forms following basic rules.
Google reuses the design of those cards for different plattforms, the easiest solution should be showing some WebView and using HTML5.
I agree with Kevin, as this answer is entirely based on personal opinion, too.
The way I would go is to create a card class which will load some JSON data and format it with HTML and CSS. Looking at each card it would be hell to format things that way natively. I mean, attributed strings is not the way to go. Too much logic for deciding which card get a bigger text or a picture.
Additionally, the top header is most likely "localized" as well, so you get the location and load a localized image. But that is Google by nature.

Quickly browse localized app store descriptions in other languages and/or countries?

As I am writing and translating localized app store descriptions for my app, I thought it would be handy to read other same-category apps' localized descriptions. However this has become more complicated than I had hoped (e.g., don't really want to change my Mac's language setting on top of my iTunes store country preference). Plus I have had limited success doing this on with OS X and iOS.
Can someone suggest a quick and easy way to look at app store descriptions in another language? I am sure I am missing something obvious here, for example currently I am poking around App Annie to see if it has archived localized descriptions.
Yes, there is a solution. You can use the urls that Apple provides and read the app description from there:
Head over to http://linkmaker.itunes.apple.com/ and you will see that there you can select a country.
For example, searching for "Twitter" in iOS apps and US you get (after removing the trailing url garbage):
https://itunes.apple.com/us/app/twitter/id333903271?mt=8
Now just change the country code. E.g., German and Italian:
https://itunes.apple.com/de/app/twitter/id333903271?mt=8
https://itunes.apple.com/it/app/twitter/id333903271?mt=8
The best way is to modify URL and view it in browser.
If you open an app using URL:
itunes.apple.com/app/APP_NAME/ID
(for example: https://itunes.apple.com/app/zuko-monsters/id545619234?mt=8)
you can just add country code after first part:
itunes.apple.com/de/app/APP_NAME/ID
itunes.apple.com/us/app/APP_NAME/ID
(for example: https://itunes.apple.com/de/app/zuko-monsters/id545619234?mt=8)

translate to multiple languages

I would like to get translation from one ( best - automatically detected) language to 4 different using google-translate. My idea is to wrote a html document which contain 4 frames - in one of them I can find text form and button. After click on it, Internet browser will send demand to google translate and show results in 4 frames.
If you want a self service, hosted service that does translations and content management for you check out Localize.js
This is going to be terribly translated. As someone that speaks English well, Russian poorly, and Spanish even more poorly, I can detect that these auto-translations never come out right.
My recommendation is to serve your page through a basic system that will allow you to respond to submitted form values. Pass in &LANG=two country iso code and then have your backend serve up the correct data.
Have someone that speaks both languages prepare the content for you. Then, whenever you are serving these pages, you can also conditionally adjust CSS to account for differences in format which come from difference in language length.
If you don't have those capabilities available, make 5 pages. One in English and the other 4 in the other languages. You will seriously seem retarded to anyone that speaks those languages well if you use an auto-translate. I think this is a bad idea for any kind of professional page, even if you can work out the technical issues.
-Brian J. Stinar-
Google has an API to its translate tool that will enable you to send it some text and receive back that text translated into any language you choose.
edit: This is now a paid service

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/

Resources