Just to throw my $0.02 into this discussion.  I've recently had some very 
generous users help me translate my app into 3 additional languages, and 
the points about getting your app ready for localization from day 1 can't 
be overemphasized.  For those of us who do Android work as a hobby, these 
points ring true for any other type of application development.  Here's 
some of the things I've wound up doing and found helpful.  I've just 
submitted an iOS port to the iOS app store, and as a result of doing all 
this for Android (for my app "Sun Surveyor"), developing that port with 
localization in mind from day 1 for iOS was so, so, so much easier.

- Date/Time and number formatting - never hardcode this stuff.  I suggest 
the use of a (potentially static) Formatter class that can abstract the 
formatting of application specific strings, numbers and date/time 
representations.  Of course this class will be using the built in OS Number 
/ Date formatter classes which will be able to work based on the user or 
OS-set locale.  So abstraction is your friend and is very key here.  I see 
a ton of apps that don't even respect whether the user's time preference is 
12h or 24h when displaying time, which is annoying, since it's really one 
of the easier things to abstract.

- Resources such as HTML help files, or long or richly formatted strings - 
I store these in the res/raw-de, res/raw-it, etc folders, as HTML, 
plaintext, etc and then load them appropriately.

- Simple strings are stored correspondingly in strings.xml in values-de, 
values-it, etc.  Avoiding having any sort of static strings in your 
application code as magic strings or constants at all is a good (or 
necessary) goal.

For iOS it was a matter of writing a quick piece of code to just convert 
the Android strings.xml files into the Localizable.strings that apple uses.

As part of the iTunes Connect component and as part of the app-store 
submission component, Apple as a courtesy also provides a directory of 
companies which offer exactly this sort of translation of string resources, 
marketing text and application copy (ie html etc).  I can provide some off 
list, I don't think it's appropriate to share them here as it's potentially 
spammy.  I've never used any, but mainly because I was ignorant to the fact 
that they exist, until now.

A lesson learned here was that wow, you can really have more text than 
you'd imagine in an application, when looking at it from the perspective of 
localization.  Several other generous users balked at doing a translation 
because of the volume.  It may also be a good exercise to consider that 
every unnecessary word in your application copy or application text is an 
expense.  Some speechwriters and scriptwriters sometimes think about it 
this way in order to make sure what they write is powerful, clear and to 
the point.  Of course as engineers it's not the natural hat we wear, but we 
think of code bloat and technical debt the same way.


On Sunday, May 6, 2012 7:47:37 AM UTC-4, JTeagle wrote:
>
> >It is not actually hard, but there are so much details that you have 
> >to think of that your program needs to adjust to. A simple one is what 
> >do the country use for decimal separator? Comma ',' or point '.'? 
>
> Another example is pricing - not all locales put the currency symbol in 
> front of the number, but instead put it behind. 
>
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to