Pre-built localization strings for multiple languages - android

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

Related

How Localazy and Phrase Android SDk updating stings declaired in strings.xml over the air

I am working on an application where it is required that I have to change.update string resources declared in my String.xml file over the air without uploading a new version on stores. (From server)
Currently, it is already implemented by Localazy and Phrase Android SDK.
The client wants to update anything declared in the String.xml and for every local.
I have to do it for multiple languages. I have already implemented localization. But the app still requires dynamic changes in the String resources,
As the author of this technology at Localazy, I can explain it pretty well.
How do we change strings.xml on the fly? We don't.
Our Gradle plugin adds a library to your app, performs bytecode analysis, and routes all the relevant method calls through our library. The library itself acts as a proxy, updates its internal strings database from our servers, and serves updated strings whenever possible. It also calculates anonymous stats about string usage, etc., to optimize the translation process on the Localazy site.
All of this happens during the build time without ever touching your source code and resources. It's completely transparent.
While it sounds like a simple task, it's much more complicated as it's impossible to route all method calls easily. E.g., LayoutInflater uses a different method for obtaining strings, and the same applies to Preferences, Menus, etc.
We also download and merge your strings.xml with the latest translations available on Localazy as the standard system method is always a reasonable fallback. We must correctly handle edge cases such as language aliases (iw vs. he), RTL languages, etc.
One of the biggest challenges was correctly supporting build types, product flavors, libraries, and dynamic app modules. It's not just about serving strings from the internal database but selecting the right one. E.g., a string with the same key from a library has lower priority than the app's one. The situation is different for dynamic app modules.
We've designed Localazy to handle all of these situations from the ground - the library, how we store strings on our servers, etc.
It's not a simple task to do this correctly, so better use the existing solution if possible.
Feel free to ask me if you need further help.

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?

How do I verify Android internationalization visually?

We're facing a upcoming internationalization project for our Android app, expanding significantly on the three currently supported languages. All the languages that we're initially supporting will use existing layouts and are left-to-right, and we are already familiar with language specific setups (separate resource files etc.) as required, so fortunately nothing too exotic is in store for now.
I would like to be able to visually verify that our layouts work and that everything looks OK. Are there any good tools or best practices available for this need? Trying to find resources, I've only been able to identify tools for managing the actual string resources themselves or different platforms for sourcing translations, but nothing that would render them in their actual context for verification.
The only immediate thing that I can think of is to essentially run our test scripts with something like this screenshot lib, and then rinse and repeat for every language we should support. Is there a better, less work intensive and time-consuming (a single testrun times languages supported will probably take at least a few hours on a single device) approach?

Add a new language in android without republishing the app

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.

Overriding languages in library project

I have a library project that defines the basic structure of an app. I then have several apps based on this library project. To put things in perspective, the library project has about 300 classes (activities, services, data model representation, etc.) Individual apps have about 2-3 classes each, essentially the main activity plus a bit of code customising whatever the library project creates.
The library project contains string resources in several languages (English, Russian, and French at present, but will be extended as translations are ready). The actual apps based on this library project may not require all of these translations. So, is there any way to disable specific languages in the library project from the main app project?
To give a simple example, the library project has English as the main language and also contains resources for Russian and French. The application must always be presented in English (client's requirement). Naturally, I define the application specific resources in English only, but whenever strings from the library project are used, they do come in Russian or French when the device locale is set to one of them. I need to somehow, from the main app, indicate that I only want to use English resources, regardless of the device locale. Is there a way to do this? If yes, how?

Categories

Resources