Benutzer-Werkzeuge

Webseiten-Werkzeuge


Seitenleiste

Site Map
Tags
iphone:localisation

View page as slide show

Lost in Translation ?

现在什么?_ _ _ هناك التطبيق لذلك!

Goal: Translating an App should not involve development, existing translations should be kept.

Problems, Tools, Best Practices.

Problems

conflicting goals:

  1. not in focus of english speaking developer/tester
  2. Apple tools are a bit odd, e.g. genstrings (not incremental)
  3. xibs even worse to keep up-to-date
  4. OMG: images!
  5. hard to verify: fringe screens, bilingual devs

Interlude: Localisation != Translation

  1. Localisation: prepare for translation (NSLocalizedString, dev task)
  2. Translation: do translation (Localizable.strings, non-dev task) == Not in focus of english speaking developer/tester

# most apps + devs english ⇒ no goal,

  1. annoying NSLocalizedString(@„foo“, @„bar) when developing,
  2. but: expensive to hunt down when releasing,
    1. hard to find automatically - many technical strings
    2. NSLocalizedString & friends mandatory to leverage genstrings

So,

  1. make a habit to wrap every @„english text“ in NSLocalizedString(@„english text“, @„view hint“) whenever you meet one,
  2. don't even bother about defining a mnemonic key but use just the english literal/format string.
  3. (mnemonic: 2x the typing plus clueless translators)

Apple tools are a bit odd

IMO there's no way around genstrings, despite it's shortcomings:

  1. doesn't update but overwrite,
  2. UTF-16 - not (git) diff friendly,
  3. macro NSLocalizedString doesn't tell source file.

Solution to 1 + 2

genstrings_incremental


Nice: no xml/xliff, just plain text word lists for translation.

NSLocalizedString

/* TBA */
"TBA" = "TBA";

or

/* ContributeVC
   Feedback */
"Submit" = "Absenden";

which one would you choose?

NSLocalizedString(@"Submit", @"ContributeVC")

Xcode project target membership

  • we're not doing it 100% how Xcode likes it,
  • reason: define translations per target, not whole project
  • caution: keep Localizable.strings in sensible directory

Project Navigator File Properties

tl;dr

  1. no literals in xibs, inject text via IBOutlet,
  2. prefer rendered text, avoid images,
  3. wrap every user visible string whenever you find one,
  4. always localise the format string,
  5. always preserve existing, used translated phrases: genstrings_incremental.

Thank you

for your attention.

iphone/localisation.txt · Zuletzt geändert: 2013/01/29 23:50 von mro