I have an idea to let users translate my application to their own languages.
I imagine this in this way:
If application is not translated to user's system language, English version of UI is displayed and user is asked for help in translation (it's obvious)
Next, user is asked for translate some phrases from English to his mother tongue. And asked to check some others translations. (it's a bit of work, but nothing sophisticated)
Hard part of my idea is:
User presses "update translation" and text resources for this application are update to latest editions.
Of course it's possible to make frequent updates, but this approach has some disadvantages:
1. I have to make all of those updates frequently, and not all of users will be happy with it.
2 Even if updates will be done weekly, time from make effort to get results will be too long form most of users, and probably, response will be not as good as it can be.
Have you any idea how to load translations "on-line"?
Android currently doesn't support this. To accomplish what you want, you'd need to insert your own resource handling code to return strings everywhere they are used in your UI. This means you couldn't let the framework load strings itself (for example no use of android:text="#string/something" in your layouts), and calling your own function to retrieve a string that wraps Resources.getString()/getText().
And you'll also need to deal with the fact that resource IDs are not stable and can change with every build of your app.
So you are looking at something quite non-trivial.
I have done some internationalizations using:
launchpad with android2po
getLocalization
I will first check if they have some kind of api. If there is no API, I would check the gettext's java implementation and handle translations with it.
You could cache any of the current user's translations in a file on the SD/storage, and show it to that specific user. Then, when it gets its weekly update, remove the cached file and start again?
Related
If I wanted to translate an entire app (with button names and labels, and long text), is it better to just make a different app? Or is there a translation api I can use?
The reason I ask is that I tried going to the Goolge Play store and searching it in a different language, and it basically didn't understand what I wanted. So is there a different Goolge Play interface for different languages? Or some setting which I need to turn on?
How does this generally work?
Thank you!
use all your strings from a file instead of hard coded way. the name of the file is strings.xml in values folder, and for another language what u need to do is to crate values-ru values-ch etc. folder and put your strings.xml inside the folder. and change the values. this was a fast approach to explain your solution. for expanded, detailed solution is here : http://developer.android.com/guide/topics/resources/localization.html
You don't want to make multiple versions of the application. In general this is accomplished by using a locale-specific dictionary for each translation you want to use, so instead of hard-coding strings in your application you would reference an element in the appropriate reference database instead, which is basically a list of all the strings you use in your application.
Here's some information I found specifically for Android development: http://developer.android.com/guide/topics/resources/localization.html
As for translating, natural language processing isn't far enough along yet to give good translations automatically, especially without context. You can try Google's translate API (https://developers.google.com/translate/) which uses some statistical methods, but even that will likely give you erroneous translations (I'm sure you've probably used Google or another service to translate something and out came something you could be pretty certain wasn't accurate). You might be able to use that as a first step to converting the application to different languages and, if your application is open source (or even if it isn't) ask for user input as to the accuracy of the various translations.
Hopefully that is helpful.
So I am in need of some assistance in trying to determine what I am going to need in order to accomplish a task.
Plain and simple...I am looking at accessing multiple databases some of which may contain over 10,000 records via Android. From what I have seen web services that return JSON is the way to go for something of this nature, but I don't think that fully answers my question or know if this is the preferred way to go about this.
Digging a bit deeper...I have a few apps on the market now, but this will be my first attempt at an enterprise style app, and I have accessed public web services with a lot smaller footprint than what this is going to be. I have little to no experience within the realm of server/network administration which is where I am getting tripped up. This is from the ground up and I have to ability to obtain almost any resources I need to complete this task.
It appears that there is a SQL Server 2008 on the back end if that helps. If I need to provide further details let me know. I am looking at a solution that will handle organizational growth, scalability, authentication and ease of user...so keep that in mind too.
So what is the best practice/preferred method for doing an enterprise application with a substantial data set? What are the big dogs doing, and how? Both on the client side and server side. I am trying not to "screw the pooch" out of the gates on this, and this is one of those measure twice and cut once situations which is why I am trying to garner plenty of input and assistance.
Thanks in advance!
If you don't have an API/service yet, you need to write one on top of your database.
I can think of two approaches, depending upon your use case.
Paging: Setup an API that supports paging, and show the results page by page. The user can't possibly view 10000 records in one go.
Search and suggest: Try creating a suggestion list, when the user starts typing out something. Fetch results that start with the initial characters entered. However, the API should limit the results to a comfortable number, so that you don't have to parse a lot.
Depending on your use case, you could try one of these.
I've got a question more about a strategy to use in order to implement the following requirement.
I need to develop a functionality where a user can perform some actions in the application like posting photos, commenting on photos etc. Every of this actions should leave a log somewhere and after entering one of the screens in my app, all the logs should be visible chronologically (the latest first). I've used a TreeSet sorted by item date and it works pretty fine. The problem is to keep this data persistently so that there's a never ending history of logs. I'm reluctant to migrate my code to SQLite unless it's necessary.. I like quite a lot my TreeSet structure thanks to its methods I managed to keep the logic simple. The problem starts when I'm to save this object across different launches of my app....
Has any one any idea how to solve it? Maybe TreeSet is a wrong decision though?
Putting the Logs in SQLite isn't a bad idea. Your other options is to put them in a file, and keep writing to it. You could then write a class to handle sorting it which shouldn't be too bad. The added benefit of using SQLite would be that sorting by Date would be a breeze. But then then exporting it would require the extra work, while having it already in a file makes it easy. So its really just a preference.
I have an application that was build with all the text in English. I would like to add more support for other languages, but am concerned about my users who don't necessarily care about the application now having support for Spanish or whatever new language I have added needing to update. Also, if I am correcting bad translations on a daily basis this would be really annoying to users.
One idea is to make calls to a web service that provides the content for there specific local, which would allow for easy changing if there are bad translations and what have you. The concern with this is of course the speed.
So is there a right way or a better way to add/change values in the localization without forcing people to update?
I understand your problem. And I have one question. Do you think that it will not be annoying for users if your application requests the external service every time when, for instance, new activity is opened?
To my point of view, you should add support of a language, test the correctness of your translation (for instance, you can ask a user from another country who use your application to check the translation) and only then update your app in the market. If all your string resources are in xml files it is not very difficult to support several languages.
So my proposal for you is at first extract all your string resources into strings.xml file (for default language folder), and then just make several values folders with additional language support.
Adding localization is usually (if you followed the good practices) a matter of upgrading a few XML files. So even if the users upgrade, it won't take long at all and they will probably not notice (if they use autoupdate) from the market.
Check this out for more details.
so I am starting to learn how to develop Android Applications. I have experience with Java and C# from school, and I would say that while I am not a pro, I definitely have a fairly good handle on Object Oriented Programming.
So one thing I don't understand about Android is resources. For example, let's say I have a TextView in my GUI. Why do I have to define a string "Hello," then make the value that string called "Hello" = "hello?" I don't understand why the software development kit doesn't just let users make that string value "hello," and be done with it. What is the purpose of storing numbers and strings and stuff into resources? I know that there must be a solid explanation for this, but I just don't know what.
Also, I am experimenting with an Addition program (where I prompt the user with a randomized math problem, and they can input their answer, and my program will check if it is right or wrong, and restart). So I have a TextView for the problem (i.e., 1 + 1). When I create the TextView, I had to create a problemString in the resources, and then assign the problem TextView to the problemString. However, in my program, when the user has gotten the math problem right or wrong, I write over the problem with a new problem by simply changing the text of the textview. In no way do I interact with the problemString from the resources. And this works. So again, my question is, what is the purpose of having application resources and what role do they play in an application.
Also, how do I access, write over, and do stuff with the application resources.
Sorry that this is a really long question, but I really think Android dev. is really cool, and I am very eager to learn. Any help is APPRECIATED! xD
Thanks!
Imagine your application with a thousand different strings to display to a user. If you need to change 30 of them, do you want to dig through all your code, or one file?
Also localization is another reason for having different sets of string resources, as well as other resources, specific to a locale. Take the above scenario, a thousand different strings, AND three different languages. How would you handle that? Three different version programs? No.