Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Internationalizing your Android Application

Internationalizing your Android Application

How MeetMe went international on Android. Presented in 2012 to Android Alliance Philadelphia: http://www.meetup.com/AndroidAlliancePhilly/events/84300832/

Dallas Gutauckis

November 28, 2012
Tweet

More Decks by Dallas Gutauckis

Other Decks in Programming

Transcript

  1. How  MeetMe  went  i18n  (on  Android)   Dallas  Gutauckis  

    @DallasGutauckis   [email protected]   DallasGutauckis.com   github.com/DallasGutauckis    
  2. Dallas  Gutauckis  (me)   §  Sr.  Architect  @  MeetMe  

    §  Amateur  photographer  and   designer   §  Programmer,  Developer,   Engineer,  Architect,  ScienFst  
  3. Why  interna=onalize?   §  MeetMe  sees  internaFonalizing  as  mutually  beneficial

      –  Users  get  a  beKer  experience  with  naFve  language  support   –  Large  potenFal  market  outside  of  English-­‐speaking  market  
  4. Stringify  early,  stringify  oHen   §  Use  strings  liberally  

      <string name=“introduction”>Hello, World!</string>
  5. Pluralize!   §  Got  a  string  that  has  a  variable

     number  in  it?  Use  plurals!   <plurals name=”introduction"> <item quantity="one">Hello, one world!</item> <item quantity="other">Hello, %d worlds!</item> </plurals>
  6. Strings   §  Use  ‘em  how  they’re  designed  to  be

     used  (and  more)   –  Strings   –  Plurals   –  Arrays   –  (more)  Gender-­‐focused  OR  gender-­‐neutral  strings   §  First  thing  we  had  to  reconcile  out  of  the  gate   §  We  started  with  ~850  pre-­‐exisFng  strings  entries  (we  were  lucky  to   have  had  the  foresight  to  do  this  much)   §  Ended  with  ~910  
  7. Addressing  layout  issues   §  Designed  to  fit   – 

    Determine  ways  to  abbreviate.  Brevity  will  typically   benefit  you  anyway.    
  8. Addressing  layout  issues   §  Designed  to  flex   – 

    Update  the  layout  to  resolve  any  hard-­‐coded   dimensions  and  be  more  flexible   o  ScrollView  is  your  friend   o  HorizontalScrollView  too   o  AutoResizeTextView  (online)  
  9. Localizing   §  Dates   –  Calendar,  Date   – 

    DateUFls   §  Numbers   –  NumberFormat   o  Decimals   o  Grouping  (thousands)   o  Currency   o  Etc   §  Distances  
  10. On  depending  on  APIs   §  Success/error  messages   – 

    Whoops   –  Error  types  and  codes  corresponding  to  specific  errors   o  Invalid  credenFals?  AuthExcepFon#0x01   §  Huge  and/or  variable  lists  of  anything   –  Region  names   –  Random  quesFons  
  11. Human  Transla=ons   §  NaFve  speaker  translaFons  (outsourced)   § 

    NaFve  speaker  reviews  (in-­‐house)/QA  review   §  Iterate   §  In-­‐house  reviews   §  Release  
  12. Keeping  sane   §  TranslaFon  management  can  be  a  lot

     of  work.  Automate.   §  Ongoing  development  includes  automated  translaFon  process   –  Keeps  developers  from  having  to  deal  with  logisFcs  of  translaFon  management  
  13. Be  pessimis=c   §  Don’t  assume  you  understand  internaFonalizaFon  

    §  Quotes   §  Ellipses   §  Wikipedia  is  your  friend!  
  14. What  are  the  best  devices  to  confirm  with?   § 

    Nexus  One   §  Nexus  S   §  Galaxy  Nexus   §  Nexus  7   §  Nexus  4