Add a new language in android without republishing the app - android

I know how develop a multilingual app in Android.
The following link explains how to do so.
http://developer.android.com/guide/topics/resources/localization.html
Assume that I release to the market my app in 3 different languages developed with the best practices described in the link above in mind.
If I want to add a new language I have to republish a new version. Is there a good way to avoid republishing the app if I add more languages?
It is important that the application detects the correct language according to the language of the smartphone.

If you are using the standard localization framework then the answer is no, because all the localization files are looked up in the res folder at runtime. And to update the res folder, you need to update the apk.
The only possible way to do what you want is by coding your own localization framework, which, intuitively, should not be too hard. (Your have a function that searches for a string in a file, and the file is determined by the language). The bad thing is that you would need to set all the strings on your user interface objects programmatically.

Related

Best way of dealing with Android text translations / app internationalization

I find it out that dealing with text translations in Android is difficult. There are some discussions about this topic, but I haven't found a definitive good solution yet. (which is weird since I believe there are tons of apps that need to manage translations. Also, I assume Google wants to provide better-quality apps and internationalization plays an important role in this)
What I am trying to achieve:
Extract strings.xml into an Excel that I can later share with others (translator, native person,..)
Convert that Excel file back into strings.xml
This is an ongoing process. As I am developing new features, more strings get added/changed, thus the above process needs to be repeated
Of course, there is the well-known Translations Editor in Android Studio. Unfortunately, with the new versions of IDE, it does not allow you to copy/paste data into Excel so you can later share it with others
There is the option of installing an older version of Android Studio from here that lets you copy/paste data from Translations Editor. (this is dumb in my opinion)
Also, I found other partial solutions:
A third-party plugin that converts .xml to .csv (link here). Unfortunately, it does not seem to work anymore
A website that takes your strings.xml as an input, and provides translated strings.xml in any language you choose (it users Google Translate). - not exactly what I need
Another website where you can upload the strings.xml and get the .csv file. - it partially solves my problem
What would be ideal for me is a version of Translations Editor that is online and can be edited by multiple persons at the same time
Does this solution exist? How are you dealing with this issue?

Pre-built localization strings for multiple languages

It is a tedious task to localize app's for multiple languages, and very often the same work is done over and over again:
For example, phrases like "OK", "Cancel" are in almost every android app.
Localization of mobile apps - Any resources available for the basics?
This question is 3 years old, I wonder if anything changed since then.
Are there any comprehensive libraries/collections which take care of this? So that I only have to translate the actually app-specific strings?
I would suggest using the Google Translator Toolkit. It supports the various localization files. It also has support for iOS and Android localization files.
Example: For Android you can upload your strings.xml you can select to which files you want to get it translated. It is automatically translated by Google Translate. It uses different colors to display how sure Google Translate is about the translation, and gives feedback about things that needs to be changed in the translations.
You can also use a translation memory. This is a database with saved translations. You can create a personal Translation memory. This contains all the translations you made. You can also use the global TM.
The global TM saves and stores translations from Translator Toolkit users everywhere. Please note that the global TM is available for anyone to see and use.
You read more about it on the support page
It has an editor build in which allows you to change the automatically translated words/sentences. You can export the translations as strings.xml again, so you can use them straightaway in your Android project.
A disadvantage: I don't think it is possible to switch between localization formats, so you have to translate all sentences for both the iOS and Android version.
You can read more about it on the support page

How to create a multi-platform localization solution?

I am .NET developer and currently working with WPF and ASP.NET MVC 4. The next project I should start will be a web application with good chance to later create clients for desktop/mobile/tablets. In other words, this application could be used from the web browser but also from native applications on Android, iOS, WinPhone8 and Windows Desktop (WPF). I have very limited experience with iOS development and none with Android dev.
One of the features I plan to have in this product is ability for users to select a language on which they want to use GUI, be it in web browser or any other client. Thus I need to create localization solution that would work with all platforms I plan to support. Since I am starting this project with first creating the web app in ASP.NET MVC I am not interested in using Microsoft's default support for localization via resources files (.resx) since that wouldn't be portable.
What are different options out there for creating multi-language support in apps deployed for various platforms? The first idea is to use XML files but I am also interested in exploring other possible solutions that might already exist out there. Any ideas on how to approach this problem are welcome.
First of all I'm not sure if your question should be addressed to the Android and iOs developers (using the iOs and Android tags) because if the client loads content provided by the server then the most common way to do this localization (i encountered very often) is to provide different URL's for different languages, probably with a parameter in the url, something like wwww.yourserver.com/en_us/otherstuffhere where en_us should be the country code and in this way the client can change the URL that will use for the following requests.
Of course it's rely hard to localize all the app using a server content, especially UI components such as button titles, placeholders etc. for these there are proper ways to localize them using iOS and Android OS features for localization.
P.S I have no idea how Windows phone OS works.
As far as I know, there is nothing really out there that would do what you want.
Most systems work well with JSON.
What you could do, is use any of the .resx to JSON solutions that are out there and just store all your localization strings in resx and then automatically convert them to JSON for other platforms.
Forget about one solution, just use whatever format the plattform offers and use a tool like Trados or Transifex to manually convert the different formats.
I'd recommend to use whatever format given platform has native, otherwise you will cause you lot of extra troubles.
You can then either use some tools to convert and merge these formats (translate-toolkit is great in this) or use some translation platform which will allow you to translate all of them in one interface. Transifex (service), Crowdin (service) or Weblate (service or instalable) should be able to do this.
Weblate can help you also with keeping them in sync, I don't think others have such feature (I'm author of Weblate).

Android TTS add languages

I would like to develop an app that uses TTS for many languages. The problem is that only few languages come with specific devices, depending on the country I suppose (I'm talking about PICO). Is there a way to use a TTS engin embedded in my apk or find somewhere online the missing PICO files and put them in the apk... or any other solution to support languages but present in the device by default?
Read this article: http://android-developers.blogspot.com/2009/09/introduction-to-text-to-speech-in.html
There is an intent (action - ACTION_INSTALL_TTS_DATA) which automatically will download required languages.
Also, I believe you can do two things:
a) Implement your own service based on http://developer.android.com/reference/android/speech/tts/TextToSpeechService.html).
b) You can load some custom files using API - addEarcon(String earcon, String filename)
(http://developer.android.com/reference/android/speech/tts/TextToSpeech.html)

Is it possible to use Android scripts created with ASE as typical application for Android (e.g. written in Java)?

I am very very new to Android. I was encouraged to take a closer look at Android when I heard about possbility to write applications on Android in scripting languages like Python. This sounds great and in fact works great.
I did some experiments and everything looks very interesting. I have noticed that I can either write my scripts on Android or create script file on my computer and then copy them to Android ase/scripts folder. This is somehow different (as far as I know) from process of creating application for Android in Java (when you create code, compile it to .apk and install on Android).
To be more specific I want to know:
what are limitations (if any) of script-based applications on Android?
is it possible to ship apps written in scripitng languages to Android Market and let other users install them without requirement to install ASE?
is there some way to create more complicated, multi-file projects in scripting languages on Android?
Thanks for any hints. Also please feel free to correct me if I made any error or wrong assumption in my question - as I wrote, I am very new to Android.
what are limitations (if any) of
script-based applications on Android?
I would flip the question around. Scripts can only execute what is native to their language plus the things exposed by the Android facade. As such, you are not creating full user interfaces and the like -- at most, you have access to some pre-packaged dialogs (e.g., getPassword()). So, for scripting purposes, ASE is very slick, but you are not creating applications, IMHO.
is it possible to ship apps written in
scripitng languages to Android Market
and let other users install them
without requirement to install ASE?
Not presently. It is something that is being worked on.
is there some way to create more
complicated, multi-file projects in
scripting languages on Android?
Ummmm...you could try whatever sort of "include" construct there is in your language of choice.
Although I have not personally done so, it appears possible to compile your python scripts into an .apk. Take a peek at the instructions for sharing scripts on the [Android-Scripting Wiki][1]
[1]: http://code.google.com/p/android-scripting/wiki/SharingScripts"Android Scripting Wiki"

Categories

Resources